diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-06 11:44:08 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-06 11:44:08 -0700 |
commit | b57bdda58cda0aaf6def042d101dd85977a286ed (patch) | |
tree | 7f63afddb8275d67214d7a89cfc8a65815e79d42 /mm/slob.c | |
parent | cc41f5cede3c63836d1c0958204630b07f5b5ee7 (diff) | |
parent | 415cb47998c54195710d413c3d95e37a9339c1e8 (diff) | |
download | blackbird-op-linux-b57bdda58cda0aaf6def042d101dd85977a286ed.tar.gz blackbird-op-linux-b57bdda58cda0aaf6def042d101dd85977a286ed.zip |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6:
slub: Allow removal of slab caches during boot
Revert "slub: Allow removal of slab caches during boot"
slub numa: Fix rare allocation from unexpected node
slab: use deferable timers for its periodic housekeeping
slub: Use kmem_cache flags to detect if slab is in debugging mode.
slub: Allow removal of slab caches during boot
slub: Check kasprintf results in kmem_cache_init()
SLUB: Constants need UL
slub: Use a constant for a unspecified node.
SLOB: Free objects to their own list
slab: fix caller tracking on !CONFIG_DEBUG_SLAB && CONFIG_TRACING
Diffstat (limited to 'mm/slob.c')
-rw-r--r-- | mm/slob.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/mm/slob.c b/mm/slob.c index 3f19a347dabf..d582171c8101 100644 --- a/mm/slob.c +++ b/mm/slob.c @@ -396,6 +396,7 @@ static void slob_free(void *block, int size) slob_t *prev, *next, *b = (slob_t *)block; slobidx_t units; unsigned long flags; + struct list_head *slob_list; if (unlikely(ZERO_OR_NULL_PTR(block))) return; @@ -424,7 +425,13 @@ static void slob_free(void *block, int size) set_slob(b, units, (void *)((unsigned long)(b + SLOB_UNITS(PAGE_SIZE)) & PAGE_MASK)); - set_slob_page_free(sp, &free_slob_small); + if (size < SLOB_BREAK1) + slob_list = &free_slob_small; + else if (size < SLOB_BREAK2) + slob_list = &free_slob_medium; + else + slob_list = &free_slob_large; + set_slob_page_free(sp, slob_list); goto out; } |