Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=679299b32dbf9bac4bdaedc850fb95d0f81b4963
Commit:     679299b32dbf9bac4bdaedc850fb95d0f81b4963
Parent:     8bc3be2751b4f74ab90a446da1912fd8204d53f7
Author:     Matt Mackall <[EMAIL PROTECTED]>
AuthorDate: Mon Feb 4 22:29:37 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Feb 5 09:44:19 2008 -0800

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 mm/slob.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/mm/slob.c b/mm/slob.c
index 773a7aa..c56c5e5 100644
--- a/mm/slob.c
+++ b/mm/slob.c
@@ -398,6 +398,10 @@ static void slob_free(void *block, int size)
        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 git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to