[PATCH 1 of 3] slob: fix free block merging at head of subpage

From: Matt Mackall
Date: Thu Jan 17 2008 - 12:59:46 EST


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@xxxxxxxxxxx>

diff -r 408d4beddb6c -r 771a5ab2c6b7 mm/slob.c
--- a/mm/slob.c Wed Jan 16 19:00:27 2008 +0000
+++ b/mm/slob.c Wed Jan 16 18:14:29 2008 -0600
@@ -398,6 +398,10 @@
sp->units += units;

if (b < sp->free) {
+ if (b + units == sp->free) {
+ units += slob_units(sp->free);
+ sp->free = slob_next(sp->free);
+ }
set_slob(b, units, sp->free);
sp->free = b;
} else {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/