diff options
| author | Nick Piggin <nickpiggin@yahoo.com.au> | 2006-01-06 03:11:21 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-06 11:33:29 -0500 |
| commit | b09eb1c06a14641209e6b86e9a5b28ea8287f193 (patch) | |
| tree | 1a3adbf25c05d7f6a585331260c2cdd7287e8c36 /include/linux | |
| parent | a74609fafa2e5cc31d558012abaaa55ec9ad9da4 (diff) | |
[PATCH] mm: page_state opt docs
Comment the new locking rules for page_state statistics.
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/page-flags.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index dede8d412dca..d52999c43336 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
| @@ -79,13 +79,23 @@ | |||
| 79 | /* | 79 | /* |
| 80 | * Global page accounting. One instance per CPU. Only unsigned longs are | 80 | * Global page accounting. One instance per CPU. Only unsigned longs are |
| 81 | * allowed. | 81 | * allowed. |
| 82 | * | ||
| 83 | * - Fields can be modified with xxx_page_state and xxx_page_state_zone at | ||
| 84 | * any time safely (which protects the instance from modification by | ||
| 85 | * interrupt. | ||
| 86 | * - The __xxx_page_state variants can be used safely when interrupts are | ||
| 87 | * disabled. | ||
| 88 | * - The __xxx_page_state variants can be used if the field is only | ||
| 89 | * modified from process context, or only modified from interrupt context. | ||
| 90 | * In this case, the field should be commented here. | ||
| 82 | */ | 91 | */ |
| 83 | struct page_state { | 92 | struct page_state { |
| 84 | unsigned long nr_dirty; /* Dirty writeable pages */ | 93 | unsigned long nr_dirty; /* Dirty writeable pages */ |
| 85 | unsigned long nr_writeback; /* Pages under writeback */ | 94 | unsigned long nr_writeback; /* Pages under writeback */ |
| 86 | unsigned long nr_unstable; /* NFS unstable pages */ | 95 | unsigned long nr_unstable; /* NFS unstable pages */ |
| 87 | unsigned long nr_page_table_pages;/* Pages used for pagetables */ | 96 | unsigned long nr_page_table_pages;/* Pages used for pagetables */ |
| 88 | unsigned long nr_mapped; /* mapped into pagetables */ | 97 | unsigned long nr_mapped; /* mapped into pagetables. |
| 98 | * only modified from process context */ | ||
| 89 | unsigned long nr_slab; /* In slab */ | 99 | unsigned long nr_slab; /* In slab */ |
| 90 | #define GET_PAGE_STATE_LAST nr_slab | 100 | #define GET_PAGE_STATE_LAST nr_slab |
| 91 | 101 | ||
