aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChristoph Lameter <cl@linux.com>2011-07-14 13:48:14 -0400
committerPekka Enberg <penberg@kernel.org>2011-07-18 08:17:01 -0400
commit013e896373fc53f3d3c039364a25ccbd1fc0729a (patch)
treedf67921f753114f3e3ea326507dbc515f2852fc6 /include
parent3adf004d82c03ca9d57cbe960657757a71e4c2e7 (diff)
Avoid duplicate _count variables in page_struct
Restructure the union / struct cascade in struct page so that we only have one definition of _count. Tested-by: Hugh Dickins <hughd@google.com> Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mm_types.h37
1 files changed, 19 insertions, 18 deletions
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 3d76a433d52f..774b8952deb4 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -49,30 +49,31 @@ struct page {
49 * see PAGE_MAPPING_ANON below. 49 * see PAGE_MAPPING_ANON below.
50 */ 50 */
51 /* Second double word */ 51 /* Second double word */
52 union { 52 struct {
53 struct { 53 union {
54 pgoff_t index; /* Our offset within mapping. */ 54 pgoff_t index; /* Our offset within mapping. */
55 atomic_t _mapcount; /* Count of ptes mapped in mms, 55 void *freelist; /* slub first free object */
56 };
57
58 union {
59 /* Used for cmpxchg_double in slub */
60 unsigned long counters;
61
62 struct {
63
64 union {
65 atomic_t _mapcount; /* Count of ptes mapped in mms,
56 * to show when page is mapped 66 * to show when page is mapped
57 * & limit reverse map searches. 67 * & limit reverse map searches.
58 */ 68 */
59 atomic_t _count; /* Usage count, see below. */
60 };
61 69
62 struct { /* SLUB cmpxchg_double area */ 70 struct {
63 void *freelist; 71 unsigned inuse:16;
64 union { 72 unsigned objects:15;
65 unsigned long counters; 73 unsigned frozen:1;
66 struct { 74 };
67 unsigned inuse:16;
68 unsigned objects:15;
69 unsigned frozen:1;
70 /*
71 * Kernel may make use of this field even when slub
72 * uses the rest of the double word!
73 */
74 atomic_t _count;
75 }; 75 };
76 atomic_t _count; /* Usage count, see below. */
76 }; 77 };
77 }; 78 };
78 }; 79 };