aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/page-flags.h
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@shadowen.org>2006-04-11 01:53:01 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-04-11 09:18:32 -0400
commit91fc8ab3c6312931d64c72845ee2f93a0f87f1a5 (patch)
tree63cbc8d224a27f7d62bd1651afa5cd3b659c7587 /include/linux/page-flags.h
parentd5ddc79bcaab6975e7671805c3578407dc33b764 (diff)
[PATCH] page flags: add commentry regarding field reservation
Add some documentation regarding the utilisation of the flags field in struct page. This field is overloaded for per page bits and to hold node, zone and SPARSEMEM information. Make it clear which areas are used for what and how many bits are in each area. Signed-off-by: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/page-flags.h')
-rw-r--r--include/linux/page-flags.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 547aac7696cd..d276a4e2f825 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -48,8 +48,20 @@
48 48
49/* 49/*
50 * Don't use the *_dontuse flags. Use the macros. Otherwise you'll break 50 * Don't use the *_dontuse flags. Use the macros. Otherwise you'll break
51 * locked- and dirty-page accounting. The top eight bits of page->flags are 51 * locked- and dirty-page accounting.
52 * used for page->zone, so putting flag bits there doesn't work. 52 *
53 * The page flags field is split into two parts, the main flags area
54 * which extends from the low bits upwards, and the fields area which
55 * extends from the high bits downwards.
56 *
57 * | FIELD | ... | FLAGS |
58 * N-1 ^ 0
59 * (N-FLAGS_RESERVED)
60 *
61 * The fields area is reserved for fields mapping zone, node and SPARSEMEM
62 * section. The boundry between these two areas is defined by
63 * FLAGS_RESERVED which defines the width of the fields section
64 * (see linux/mmzone.h). New flags must _not_ overlap with this area.
53 */ 65 */
54#define PG_locked 0 /* Page is locked. Don't touch. */ 66#define PG_locked 0 /* Page is locked. Don't touch. */
55#define PG_error 1 67#define PG_error 1