/* SPDX-License-Identifier: GPL-2.0-only */ /* * Macros for manipulating and testing flags related to a * pageblock_nr_pages number of pages. * * Copyright (C) IBM Corporation, 2006 * * Original author, Mel Gorman * Major cleanups and reduction of bit operations, Andy Whitcroft
*/ #ifndef PAGEBLOCK_FLAGS_H #define PAGEBLOCK_FLAGS_H
#include <linux/types.h>
#define PB_migratetype_bits 3 /* Bit indices that affect a whole block of pages */ enum pageblock_bits {
PB_migrate,
PB_migrate_end = PB_migrate + PB_migratetype_bits - 1, /* 3 bits required for migrate types */
PB_compact_skip,/* If set the block is skipped by compaction */
#ifdef CONFIG_MEMORY_ISOLATION /* * Pageblock isolation is represented with a separate bit, so that * the migratetype of a block is not overwritten by isolation.
*/
PB_migrate_isolate, /* If set the block is isolated */ #endif /* * Assume the bits will always align on a word. If this assumption * changes then get/set pageblock needs updating.
*/
__NR_PAGEBLOCK_BITS
};
/* Huge page sizes are variable */ externunsignedint pageblock_order;
#else/* CONFIG_HUGETLB_PAGE_SIZE_VARIABLE */
/* * Huge pages are a constant size, but don't exceed the maximum allocation * granularity.
*/ #define pageblock_order MIN_T(unsignedint, HUGETLB_PAGE_ORDER, PAGE_BLOCK_MAX_ORDER)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.