include/linux/mmdebug.h
Source file repositories/reference/linux-study-clean/include/linux/mmdebug.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/mmdebug.h- Extension
.h- Size
- 5087 bytes
- Lines
- 164
- 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/bug.hlinux/stringify.h
Detected Declarations
struct pagestruct vm_area_structstruct mm_structstruct vma_iteratorstruct vma_merge_struct
Annotated Snippet
if (unlikely(cond)) { \
dump_page(page, "VM_BUG_ON_PAGE(" __stringify(cond)")");\
BUG(); \
} \
} while (0)
#define VM_BUG_ON_FOLIO(cond, folio) \
do { \
if (unlikely(cond)) { \
dump_page(&folio->page, "VM_BUG_ON_FOLIO(" __stringify(cond)")");\
BUG(); \
} \
} while (0)
#define VM_BUG_ON_VMA(cond, vma) \
do { \
if (unlikely(cond)) { \
dump_vma(vma); \
BUG(); \
} \
} while (0)
#define VM_BUG_ON_MM(cond, mm) \
do { \
if (unlikely(cond)) { \
dump_mm(mm); \
BUG(); \
} \
} while (0)
#define VM_WARN_ON_PAGE(cond, page) ({ \
int __ret_warn = !!(cond); \
\
if (unlikely(__ret_warn)) { \
dump_page(page, "VM_WARN_ON_PAGE(" __stringify(cond)")");\
WARN_ON(1); \
} \
unlikely(__ret_warn); \
})
#define VM_WARN_ON_ONCE_PAGE(cond, page) ({ \
static bool __section(".data..once") __warned; \
int __ret_warn_once = !!(cond); \
\
if (unlikely(__ret_warn_once && !__warned)) { \
dump_page(page, "VM_WARN_ON_ONCE_PAGE(" __stringify(cond)")");\
__warned = true; \
WARN_ON(1); \
} \
unlikely(__ret_warn_once); \
})
#define VM_WARN_ON_FOLIO(cond, folio) ({ \
int __ret_warn = !!(cond); \
\
if (unlikely(__ret_warn)) { \
dump_page(&folio->page, "VM_WARN_ON_FOLIO(" __stringify(cond)")");\
WARN_ON(1); \
} \
unlikely(__ret_warn); \
})
#define VM_WARN_ON_ONCE_FOLIO(cond, folio) ({ \
static bool __section(".data..once") __warned; \
int __ret_warn_once = !!(cond); \
\
if (unlikely(__ret_warn_once && !__warned)) { \
dump_page(&folio->page, "VM_WARN_ON_ONCE_FOLIO(" __stringify(cond)")");\
__warned = true; \
WARN_ON(1); \
} \
unlikely(__ret_warn_once); \
})
#define VM_WARN_ON_ONCE_MM(cond, mm) ({ \
static bool __section(".data..once") __warned; \
int __ret_warn_once = !!(cond); \
\
if (unlikely(__ret_warn_once && !__warned)) { \
dump_mm(mm); \
__warned = true; \
WARN_ON(1); \
} \
unlikely(__ret_warn_once); \
})
#define VM_WARN_ON_ONCE_VMA(cond, vma) ({ \
static bool __section(".data..once") __warned; \
int __ret_warn_once = !!(cond); \
\
if (unlikely(__ret_warn_once && !__warned)) { \
dump_vma(vma); \
__warned = true; \
WARN_ON(1); \
} \
unlikely(__ret_warn_once); \
})
#define VM_WARN_ON_VMG(cond, vmg) ({ \
int __ret_warn = !!(cond); \
Annotation
- Immediate include surface: `linux/bug.h`, `linux/stringify.h`.
- Detected declarations: `struct page`, `struct vm_area_struct`, `struct mm_struct`, `struct vma_iterator`, `struct vma_merge_struct`.
- 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.