mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
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: slab: fix object alignment slub: add missing __percpu markup in mm/slub_def.h
This commit is contained in:
commit
bc584c5107
@ -68,7 +68,7 @@ struct kmem_cache_order_objects {
|
|||||||
* Slab cache management.
|
* Slab cache management.
|
||||||
*/
|
*/
|
||||||
struct kmem_cache {
|
struct kmem_cache {
|
||||||
struct kmem_cache_cpu *cpu_slab;
|
struct kmem_cache_cpu __percpu *cpu_slab;
|
||||||
/* Used for retriving partial slabs etc */
|
/* Used for retriving partial slabs etc */
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
int size; /* The size of an object including meta data */
|
int size; /* The size of an object including meta data */
|
||||||
|
@ -2330,8 +2330,8 @@ kmem_cache_create (const char *name, size_t size, size_t align,
|
|||||||
}
|
}
|
||||||
#if FORCED_DEBUG && defined(CONFIG_DEBUG_PAGEALLOC)
|
#if FORCED_DEBUG && defined(CONFIG_DEBUG_PAGEALLOC)
|
||||||
if (size >= malloc_sizes[INDEX_L3 + 1].cs_size
|
if (size >= malloc_sizes[INDEX_L3 + 1].cs_size
|
||||||
&& cachep->obj_size > cache_line_size() && size < PAGE_SIZE) {
|
&& cachep->obj_size > cache_line_size() && ALIGN(size, align) < PAGE_SIZE) {
|
||||||
cachep->obj_offset += PAGE_SIZE - size;
|
cachep->obj_offset += PAGE_SIZE - ALIGN(size, align);
|
||||||
size = PAGE_SIZE;
|
size = PAGE_SIZE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user