include/linux/mm_types_task.h
Source file repositories/reference/linux-study-clean/include/linux/mm_types_task.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/mm_types_task.h- Extension
.h- Size
- 2439 bytes
- Lines
- 97
- 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
linux/align.hlinux/types.hasm/page.hasm/tlbbatch.h
Detected Declarations
struct pagestruct page_fragstruct page_frag_cachestruct tlbflush_unmap_batchstruct lazy_mmu_state
Annotated Snippet
struct page_frag {
struct page *page;
#if (BITS_PER_LONG > 32) || (PAGE_SIZE >= 65536)
__u32 offset;
__u32 size;
#else
__u16 offset;
__u16 size;
#endif
};
#define PAGE_FRAG_CACHE_MAX_SIZE __ALIGN_MASK(32768, ~PAGE_MASK)
#define PAGE_FRAG_CACHE_MAX_ORDER get_order(PAGE_FRAG_CACHE_MAX_SIZE)
struct page_frag_cache {
/* encoded_page consists of the virtual address, pfmemalloc bit and
* order of a page.
*/
unsigned long encoded_page;
/* we maintain a pagecount bias, so that we dont dirty cache line
* containing page->_refcount every time we allocate a fragment.
*/
#if (PAGE_SIZE < PAGE_FRAG_CACHE_MAX_SIZE) && (BITS_PER_LONG <= 32)
__u16 offset;
__u16 pagecnt_bias;
#else
__u32 offset;
__u32 pagecnt_bias;
#endif
};
/* Track pages that require TLB flushes */
struct tlbflush_unmap_batch {
#ifdef CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
/*
* The arch code makes the following promise: generic code can modify a
* PTE, then call arch_tlbbatch_add_pending() (which internally provides
* all needed barriers), then call arch_tlbbatch_flush(), and the entries
* will be flushed on all CPUs by the time that arch_tlbbatch_flush()
* returns.
*/
struct arch_tlbflush_unmap_batch arch;
/* True if a flush is needed. */
bool flush_required;
/*
* If true then the PTE was dirty when unmapped. The entry must be
* flushed before IO is initiated or a stale TLB entry potentially
* allows an update without redirtying the page.
*/
bool writable;
#endif
};
struct lazy_mmu_state {
u8 enable_count;
u8 pause_count;
};
#endif /* _LINUX_MM_TYPES_TASK_H */
Annotation
- Immediate include surface: `linux/align.h`, `linux/types.h`, `asm/page.h`, `asm/tlbbatch.h`.
- Detected declarations: `struct page`, `struct page_frag`, `struct page_frag_cache`, `struct tlbflush_unmap_batch`, `struct lazy_mmu_state`.
- 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.