Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 86679
b: refs/heads/master
c: e153362
h: refs/heads/master
i:
  86677: 76919e0
  86675: fac7b31
  86671: 9e9cf73
v: v3
  • Loading branch information
Christoph Lameter committed Mar 3, 2008
1 parent 6f9cbf6 commit 671d16f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 24 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d9acf4b7b62d783d84273a61aed41a0f025b08ac
refs/heads/master: e153362a50a34439718a938a851bba977116e19a
27 changes: 4 additions & 23 deletions trunk/mm/slub.c
Original file line number Diff line number Diff line change
Expand Up @@ -997,30 +997,11 @@ static unsigned long kmem_cache_flags(unsigned long objsize,
void (*ctor)(struct kmem_cache *, void *))
{
/*
* The page->offset field is only 16 bit wide. This is an offset
* in units of words from the beginning of an object. If the slab
* size is bigger then we cannot move the free pointer behind the
* object anymore.
*
* On 32 bit platforms the limit is 256k. On 64bit platforms
* the limit is 512k.
*
* Debugging or ctor may create a need to move the free
* pointer. Fail if this happens.
* Enable debugging if selected on the kernel commandline.
*/
if (objsize >= 65535 * sizeof(void *)) {
BUG_ON(flags & (SLAB_RED_ZONE | SLAB_POISON |
SLAB_STORE_USER | SLAB_DESTROY_BY_RCU));
BUG_ON(ctor);
} else {
/*
* Enable debugging if selected on the kernel commandline.
*/
if (slub_debug && (!slub_debug_slabs ||
strncmp(slub_debug_slabs, name,
strlen(slub_debug_slabs)) == 0))
flags |= slub_debug;
}
if (slub_debug && (!slub_debug_slabs ||
strncmp(slub_debug_slabs, name, strlen(slub_debug_slabs)) == 0))
flags |= slub_debug;

return flags;
}
Expand Down

0 comments on commit 671d16f

Please sign in to comment.