summaryrefslogtreecommitdiff
path: root/include/linux/mm_types.h
diff options
context:
space:
mode:
authorChristoph Lameter <cl@linux.com>2012-06-13 10:24:52 -0500
committerPekka Enberg <penberg@kernel.org>2012-06-14 09:19:47 +0300
commitb8c24c4aef94b1f0daafb450363fef13a1163780 (patch)
tree59f83d4c3cdaf4d58a0692eede704e658ce5659b /include/linux/mm_types.h
parent23910c50cced8f35d53e4f8ea0cc09ad58d286af (diff)
slob: Define page struct fields used in mm_types.h
Define the fields used by slob in mm_types.h and use struct page instead of struct slob_page in slob. This cleans up numerous of typecasts in slob.c and makes readers aware of slob's use of page struct fields. [Also cleans up some bitrot in slob.c. The page struct field layout in slob.c is an old layout and does not match the one in mm_types.h] Reviewed-by: Glauber Costa <glommer@parallels.com> Acked-by: David Rientjes <rientjes@google.com> Reviewed-by: Joonsoo Kim <js1304@gmail.com> Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'include/linux/mm_types.h')
-rw-r--r--include/linux/mm_types.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index dad95bdd06d7..5922c3452592 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -53,7 +53,7 @@ struct page {
struct {
union {
pgoff_t index; /* Our offset within mapping. */
- void *freelist; /* slub first free object */
+ void *freelist; /* slub/slob first free object */
};
union {
@@ -81,11 +81,12 @@ struct page {
*/
atomic_t _mapcount;
- struct {
+ struct { /* SLUB */
unsigned inuse:16;
unsigned objects:15;
unsigned frozen:1;
};
+ int units; /* SLOB */
};
atomic_t _count; /* Usage count, see below. */
};
@@ -107,6 +108,8 @@ struct page {
short int pobjects;
#endif
};
+
+ struct list_head list; /* slobs list of pages */
};
/* Remainder is not double word aligned */