diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-06 14:44:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-06 14:44:08 -0400 |
commit | b57bdda58cda0aaf6def042d101dd85977a286ed (patch) | |
tree | 7f63afddb8275d67214d7a89cfc8a65815e79d42 /mm/slob.c | |
parent | cc41f5cede3c63836d1c0958204630b07f5b5ee7 (diff) | |
parent | 415cb47998c54195710d413c3d95e37a9339c1e8 (diff) |
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
@@ -396,6 +396,7 @@ static void slob_free(void *block, int size) | |||
396 | slob_t *prev, *next, *b = (slob_t *)block; | 396 | slob_t *prev, *next, *b = (slob_t *)block; |
397 | slobidx_t units; | 397 | slobidx_t units; |
398 | unsigned long flags; | 398 | unsigned long flags; |
399 | struct list_head *slob_list; | ||
399 | 400 | ||
400 | if (unlikely(ZERO_OR_NULL_PTR(block))) | 401 | if (unlikely(ZERO_OR_NULL_PTR(block))) |
401 | return; | 402 | return; |
@@ -424,7 +425,13 @@ static void slob_free(void *block, int size) | |||
424 | set_slob(b, units, | 425 | set_slob(b, units, |
425 | (void *)((unsigned long)(b + | 426 | (void *)((unsigned long)(b + |
426 | SLOB_UNITS(PAGE_SIZE)) & PAGE_MASK)); | 427 | SLOB_UNITS(PAGE_SIZE)) & PAGE_MASK)); |
427 | set_slob_page_free(sp, &free_slob_small); | 428 | if (size < SLOB_BREAK1) |
429 | slob_list = &free_slob_small; | ||
430 | else if (size < SLOB_BREAK2) | ||
431 | slob_list = &free_slob_medium; | ||
432 | else | ||
433 | slob_list = &free_slob_large; | ||
434 | set_slob_page_free(sp, slob_list); | ||
428 | goto out; | 435 | goto out; |
429 | } | 436 | } |
430 | 437 | ||