aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorMatt Mackall <mpm@selenic.com>2008-02-05 01:29:37 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-05 12:44:19 -0500
commit679299b32dbf9bac4bdaedc850fb95d0f81b4963 (patch)
tree1dc7edbdaf67611958273345b24d271f188371a8 /mm
parent8bc3be2751b4f74ab90a446da1912fd8204d53f7 (diff)
slob: fix free block merging at head of subpage
We weren't merging freed blocks at the beginning of the free list. Fixing this showed a 2.5% efficiency improvement in a userspace test harness. Signed-off-by: Matt Mackall <mpm@selenic.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/slob.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/slob.c b/mm/slob.c
index 773a7aa80ab5..c56c5e57c192 100644
--- a/mm/slob.c
+++ b/mm/slob.c
@@ -398,6 +398,10 @@ static void slob_free(void *block, int size)
398 sp->units += units; 398 sp->units += units;
399 399
400 if (b < sp->free) { 400 if (b < sp->free) {
401 if (b + units == sp->free) {
402 units += slob_units(sp->free);
403 sp->free = slob_next(sp->free);
404 }
401 set_slob(b, units, sp->free); 405 set_slob(b, units, sp->free);
402 sp->free = b; 406 sp->free = b;
403 } else { 407 } else {