diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-23 10:10:44 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-23 10:10:44 -0700 |
commit | 4867faab1e3eb8cc3f74e390357615d9b8e8cda6 (patch) | |
tree | 7a6cb9175c483a0f7e3672185e7f9fb25f74caa3 /include | |
parent | 6fad2b5b649fa1fa6ee7293222815f5b62499889 (diff) | |
parent | bfb91fb650e988c3c347e50fc75fedb7d4f0c018 (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: Deal with hyperthetical case of PAGE_SIZE > 2M
slub: Remove node check in slab_free
slub: avoid label inside conditional
slub: Make CONFIG_DEBUG_PAGE_ALLOC work with new fastpath
slub: Avoid warning for !CONFIG_SLUB_DEBUG
slub: Remove CONFIG_CMPXCHG_LOCAL ifdeffery
slub: Move debug handlign in __slab_free
slub: Move node determination out of hotpath
slub: Eliminate repeated use of c->page through a new page variable
slub: get_map() function to establish map of free objects in a slab
slub: Use NUMA_NO_NODE in get_partial
slub: Fix a typo in config name
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/slub_def.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index 45ca123e800..c8668d161dd 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h @@ -37,9 +37,7 @@ enum stat_item { struct kmem_cache_cpu { void **freelist; /* Pointer to next available object */ -#ifdef CONFIG_CMPXCHG_LOCAL unsigned long tid; /* Globally unique transaction id */ -#endif struct page *page; /* The slab from which we are allocating */ int node; /* The node of the page (or -1 for debug) */ #ifdef CONFIG_SLUB_STATS @@ -179,7 +177,8 @@ static __always_inline int kmalloc_index(size_t size) if (size <= 4 * 1024) return 12; /* * The following is only needed to support architectures with a larger page - * size than 4k. + * size than 4k. We need to support 2 * PAGE_SIZE here. So for a 64k page + * size we would have to go up to 128k. */ if (size <= 8 * 1024) return 13; if (size <= 16 * 1024) return 14; @@ -190,7 +189,8 @@ static __always_inline int kmalloc_index(size_t size) if (size <= 512 * 1024) return 19; if (size <= 1024 * 1024) return 20; if (size <= 2 * 1024 * 1024) return 21; - return -1; + BUG(); + return -1; /* Will never be reached */ /* * What we really wanted to do and cannot do because of compiler issues is: |