All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chandra Seetharaman <sekharan@us.ibm.com>
To: akpm@osdl.org
Cc: linux-mm <linux-mm@kvack.org>
Subject: [PATCH] call mm/page-writeback.c:set_ratelimit() when new pages are hot-added
Date: Mon, 28 Aug 2006 15:23:25 -0700	[thread overview]
Message-ID: <1156803805.1196.74.camel@linuxchandra> (raw)

ratelimit_pages in page-writeback.c is recalculated (in set_ratelimit())
every time a CPU is hot-added/removed. But this value is not recalculated
when new pages are hot-added.

This patch fixes that problem by calling set_ratelimit() when new pages
are hot-added.

Signed-Off-by: Chandra Seetharaman <sekharan@us.ibm.com>

--
Index: linux-2.6.17/mm/memory_hotplug.c
===================================================================
--- linux-2.6.17.orig/mm/memory_hotplug.c
+++ linux-2.6.17/mm/memory_hotplug.c
@@ -141,6 +141,7 @@ int online_pages(unsigned long pfn, unsi
 	unsigned long start_pfn;
 	struct zone *zone;
 	int need_zonelists_rebuild = 0;
+	extern void set_ratelimit(void);
 
 	/*
 	 * This doesn't need a lock to do pfn_to_page().
@@ -191,6 +192,7 @@ int online_pages(unsigned long pfn, unsi
 	if (need_zonelists_rebuild)
 		build_all_zonelists();
 	vm_total_pages = nr_free_pagecache_pages();
+	set_ratelimit();
 	return 0;
 }
 
Index: linux-2.6.17/mm/page-writeback.c
===================================================================
--- linux-2.6.17.orig/mm/page-writeback.c
+++ linux-2.6.17/mm/page-writeback.c
@@ -490,7 +490,7 @@ void laptop_sync_completion(void)
  * will write six megabyte chunks, max.
  */
 
-static void set_ratelimit(void)
+void set_ratelimit(void)
 {
 	ratelimit_pages = vm_total_pages / (num_online_cpus() * 32);
 	if (ratelimit_pages < 16)

-- 

----------------------------------------------------------------------
    Chandra Seetharaman               | Be careful what you choose....
              - sekharan@us.ibm.com   |      .......you may get it.
----------------------------------------------------------------------


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

             reply	other threads:[~2006-08-28 22:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-28 22:23 Chandra Seetharaman [this message]
2006-08-29  5:08 ` [PATCH] call mm/page-writeback.c:set_ratelimit() when new pages are hot-added Dave Hansen
2006-08-29  5:41 ` KAMEZAWA Hiroyuki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1156803805.1196.74.camel@linuxchandra \
    --to=sekharan@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.