Some cleanups....
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
---
include/linux/slub_def.h | 7 ++++++-
mm/slub.c | 40 ++++++++++++++++++----------------------
2 files changed, 24 insertions(+), 23 deletions(-)Index: linux-2.6/mm/slub.c
===================================================================
--- linux-2.6.orig/mm/slub.c
+++ linux-2.6/mm/slub.c
@@ -27,7 +27,7 @@
/*
* Lock order:
* 1. slab_lock(page)
- * 2. slab->list_lock
+ * 2. node->list_lock
*
* The slab_lock protects operations on the object of a particular
* slab and its metadata in the page struct. If the slab lock
@@ -163,11 +163,11 @@ static struct notifier_block slab_notifi
#endifstatic enum {
- DOWN, /* No slab functionality available */
+ DOWN = 0, /* No slab functionality available */
PARTIAL, /* kmem_cache_open() works but kmalloc does not */
UP, /* Everything works but does not show up in sysfs */
SYSFS /* Sysfs up */
-} slab_state = DOWN;
+} slab_state;/* A list of all slab caches on the system */
static DECLARE_RWSEM(slub_lock);
@@ -288,21 +288,22 @@ static inline int slab_index(void *p, st
static inline struct kmem_cache_order_objects oo_make(int order,
unsigned long size)
{
- struct kmem_cache_order_objects x = {
- (order << 16) + (PAGE_SIZE << order) / size
- };
+ struct kmem_cache_order_objects x;
+
+ x.order = order;
+ x.objects = (PAGE_SIZE << order) / size;return x;
}static inline int oo_order(struct kmem_cache_order_objects x)
{
- return x.x >> 16;
+ return x.order;
}static inline int oo_objects(struct kmem_cache_order_objects x)
{
- return x.x & ((1 << 16) - 1);
+ return x.objects;
}#ifdef CONFIG_SLUB_DEBUG
@@ -1076,8 +1077,7 @@ static struct page *allocate_slab(structflags |= s->allocflags;
- page = alloc_slab_page(flags | __GFP_NOWARN | __GFP_NORETRY, node,
- oo);
+ page = alloc_slab_page(...
Applied, thanks!
--
Hi Peter,
Could you perhaps send this patch separately?
Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi>
--
I think this version applies to mainline without modifications, so you
--
Another width limitation that will limit the number of objects in a slab to 64k.
Ack.
--
I seem to recall differently, I thought we explicitly init global stuff
Well, it was already 16 by virtue of the old code.
GCC emmiting rubbish code due to the union would be sad - I can respin
OK, will send a new one without the bad bits..
--
| Al Boldi | Re: [ck] Re: [ANNOUNCE] RSDL completely fair starvation free interactive cpu sched... |
| Ingo Molnar | Re: [patch] sched_clock(): cleanups |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Amit K. Arora | [RFC] Heads up on sys_fallocate() |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
| Gerrit Renker | [PATCH 18/37] dccp: Support for Mandatory options |
| Denys Vlasenko | [PATCH 1/2] bnx2: factor out gzip unpacker |
