projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
95b6886
)
slab: remove one NR_CPUS dependency
author
Eric Dumazet
<
[email protected]
>
Mon, 25 Jul 2011 06:55:42 +0000
(08:55 +0200)
committer
Pekka Enberg
<
[email protected]
>
Thu, 28 Jul 2011 10:40:08 +0000
(13:40 +0300)
Reduce high order allocations in do_tune_cpucache() for some setups.
(NR_CPUS=4096 -> we need 64KB)
Signed-off-by: Eric Dumazet <
[email protected]
>
Acked-by: Christoph Lameter <
[email protected]
>
Signed-off-by: Pekka Enberg <
[email protected]
>
mm/slab.c
patch
|
blob
|
history
diff --git
a/mm/slab.c
b/mm/slab.c
index 1e523ed47c619d385465a7080f44fabe68d115cb..b80282aef73bb3ad6d2e784a8b400edf494ce19d 100644
(file)
--- a/
mm/slab.c
+++ b/
mm/slab.c
@@
-3934,7
+3934,7
@@
fail:
struct ccupdate_struct {
struct kmem_cache *cachep;
- struct array_cache *new[
NR_CPUS
];
+ struct array_cache *new[
0
];
};
static void do_ccupdate_local(void *info)
@@
-3956,7
+3956,8
@@
static int do_tune_cpucache(struct kmem_cache *cachep, int limit,
struct ccupdate_struct *new;
int i;
- new = kzalloc(sizeof(*new), gfp);
+ new = kzalloc(sizeof(*new) + nr_cpu_ids * sizeof(struct array_cache *),
+ gfp);
if (!new)
return -ENOMEM;