include/linux/page-isolation.h
Source file repositories/reference/linux-study-clean/include/linux/page-isolation.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/page-isolation.h- Extension
.h- Size
- 2217 bytes
- Lines
- 73
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
enum pb_isolate_modefunction is_migrate_isolate_pagefunction is_migrate_isolatefunction is_migrate_isolate_pagefunction is_migrate_isolatefunction get_pageblock_isolatefunction clear_pageblock_isolate
Annotated Snippet
#ifndef __LINUX_PAGEISOLATION_H
#define __LINUX_PAGEISOLATION_H
#ifdef CONFIG_MEMORY_ISOLATION
static inline bool is_migrate_isolate_page(struct page *page)
{
return get_pageblock_migratetype(page) == MIGRATE_ISOLATE;
}
static inline bool is_migrate_isolate(int migratetype)
{
return migratetype == MIGRATE_ISOLATE;
}
#define get_pageblock_isolate(page) \
get_pfnblock_bit(page, page_to_pfn(page), PB_migrate_isolate)
#define clear_pageblock_isolate(page) \
clear_pfnblock_bit(page, page_to_pfn(page), PB_migrate_isolate)
#define set_pageblock_isolate(page) \
set_pfnblock_bit(page, page_to_pfn(page), PB_migrate_isolate)
#else
static inline bool is_migrate_isolate_page(struct page *page)
{
return false;
}
static inline bool is_migrate_isolate(int migratetype)
{
return false;
}
static inline bool get_pageblock_isolate(struct page *page)
{
return false;
}
static inline void clear_pageblock_isolate(struct page *page)
{
}
static inline void set_pageblock_isolate(struct page *page)
{
}
#endif
/*
* Pageblock isolation modes:
* PB_ISOLATE_MODE_MEM_OFFLINE - isolate to offline (!allocate) memory
* e.g., skip over PageHWPoison() pages and
* PageOffline() pages. Unmovable pages will be
* reported in this mode.
* PB_ISOLATE_MODE_CMA_ALLOC - isolate for CMA allocations
* PB_ISOLATE_MODE_OTHER - isolate for other purposes
*/
enum pb_isolate_mode {
PB_ISOLATE_MODE_MEM_OFFLINE,
PB_ISOLATE_MODE_CMA_ALLOC,
PB_ISOLATE_MODE_OTHER,
};
void __meminit init_pageblock_migratetype(struct page *page,
enum migratetype migratetype,
bool isolate);
bool pageblock_isolate_and_move_free_pages(struct zone *zone, struct page *page);
bool pageblock_unisolate_and_move_free_pages(struct zone *zone, struct page *page);
int start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn,
enum pb_isolate_mode mode);
void undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn);
int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn,
enum pb_isolate_mode mode);
bool page_is_unmovable(struct zone *zone, struct page *page,
enum pb_isolate_mode mode, unsigned long *step);
#endif
Annotation
- Detected declarations: `enum pb_isolate_mode`, `function is_migrate_isolate_page`, `function is_migrate_isolate`, `function is_migrate_isolate_page`, `function is_migrate_isolate`, `function get_pageblock_isolate`, `function clear_pageblock_isolate`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.