Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3b1d92c56514987010bb0201b5c71aeb633fc4f8
Commit:     3b1d92c56514987010bb0201b5c71aeb633fc4f8
Parent:     8da3430d8a7f885c2bf65121181d76c9d290a86e
Author:     Mel Gorman <[EMAIL PROTECTED]>
AuthorDate: Sun May 6 14:49:30 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Mon May 7 12:12:53 2007 -0700

    Do not disable interrupts when reading min_free_kbytes
    
    The sysctl handler for min_free_kbytes calls setup_per_zone_pages_min() on
    read or write.  This function iterates through every zone and calls
    spin_lock_irqsave() on the zone LRU lock.  When reading min_free_kbytes,
    this is a total waste of time that disables interrupts on the local
    processor.  It might even be noticable machines with large numbers of zones
    if a process started constantly reading min_free_kbytes.
    
    This patch only calls setup_per_zone_pages_min() only on write. Tested on
    an x86 laptop and it did the right thing.
    
    Signed-off-by: Mel Gorman <[EMAIL PROTECTED]>
    Acked-by: Christoph Lameter <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 mm/page_alloc.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index f564717..542fc08 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3199,7 +3199,8 @@ int min_free_kbytes_sysctl_handler(ctl_table *table, int 
write,
        struct file *file, void __user *buffer, size_t *length, loff_t *ppos)
 {
        proc_dointvec(table, write, file, buffer, length, ppos);
-       setup_per_zone_pages_min();
+       if (write)
+               setup_per_zone_pages_min();
        return 0;
 }
 
-
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