linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ethan Solomita <solo@google.com>
To: linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@google.com>,
	a.p.zijlstra@chello.nl
Subject: [RFC 5/7] cpuset write vm writeout
Date: Thu, 31 May 2007 23:15:02 -0700	[thread overview]
Message-ID: <465FB966.5020808@google.com> (raw)
In-Reply-To: <465FB6CF.4090801@google.com>

Throttle VM writeout in a cpuset aware way

This bases the vm throttling from the reclaim path on the dirty ratio
of the cpuset. Note that a cpuset is only effective if shrink_zone is called
from direct reclaim.

kswapd has a cpuset context that includes the whole machine. VM throttling
will only work during synchrononous reclaim and not  from kswapd.

Originally by Christoph Lameter <clameter@sgi.com>

Signed-off-by: Ethan Solomita <solo@google.com>

---

diff -uprN -X 0/Documentation/dontdiff 4/include/linux/writeback.h
5/include/linux/writeback.h
--- 4/include/linux/writeback.h	2007-05-30 11:36:14.000000000 -0700
+++ 5/include/linux/writeback.h	2007-05-30 11:37:01.000000000 -0700
@@ -89,7 +89,7 @@ static inline void wait_on_inode(struct
 int wakeup_pdflush(long nr_pages, nodemask_t *nodes);
 void laptop_io_completion(void);
 void laptop_sync_completion(void);
-void throttle_vm_writeout(gfp_t gfp_mask);
+void throttle_vm_writeout(nodemask_t *nodes,gfp_t gfp_mask);

 /* These are exported to sysctl. */
 extern int dirty_background_ratio;
diff -uprN -X 0/Documentation/dontdiff 4/mm/page-writeback.c
5/mm/page-writeback.c
--- 4/mm/page-writeback.c	2007-05-30 11:36:15.000000000 -0700
+++ 5/mm/page-writeback.c	2007-05-30 11:37:01.000000000 -0700
@@ -384,7 +384,7 @@ void balance_dirty_pages_ratelimited_nr(
 }
 EXPORT_SYMBOL(balance_dirty_pages_ratelimited_nr);

-void throttle_vm_writeout(gfp_t gfp_mask)
+void throttle_vm_writeout(nodemask_t *nodes, gfp_t gfp_mask)
 {
 	struct dirty_limits dl;

@@ -399,7 +399,7 @@ void throttle_vm_writeout(gfp_t gfp_mask
 	}

 	for ( ; ; ) {
-		get_dirty_limits(&dl, NULL, &node_online_map);
+		get_dirty_limits(&dl, NULL, nodes);

 		/*
 		 * Boost the allowable dirty threshold a bit for page
diff -uprN -X 0/Documentation/dontdiff 4/mm/vmscan.c 5/mm/vmscan.c
--- 4/mm/vmscan.c	2007-05-30 11:36:17.000000000 -0700
+++ 5/mm/vmscan.c	2007-05-30 11:37:01.000000000 -0700
@@ -1079,7 +1079,7 @@ static unsigned long shrink_zone(int pri
 		}
 	}

-	throttle_vm_writeout(sc->gfp_mask);
+	throttle_vm_writeout(&cpuset_current_mems_allowed, sc->gfp_mask);

 	atomic_dec(&zone->reclaim_in_progress);
 	return nr_reclaimed;


  parent reply	other threads:[~2007-06-01  6:15 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-01  6:03 [RFC 1/7] cpuset write dirty map Ethan Solomita
2007-06-01  6:10 ` [RFC 2/7] cpuset write pdflush nodemask Ethan Solomita
2007-06-01  6:11 ` [RFC 3/7] cpuset write throttle Ethan Solomita
2007-06-01  6:13 ` [RFC 4/7] cpuset write vmscan Ethan Solomita
2007-06-01  6:15 ` Ethan Solomita [this message]
2007-06-01  6:16 ` [corrected][RFC 5/7] cpuset write vm writeout Ethan Solomita
2007-06-01  6:16 ` [RFC 6/7] cpuset write fixes Ethan Solomita
2007-06-01  6:17 ` [RFC 7/7] cpuset dirty limits Ethan Solomita
2007-06-04 18:39 ` [RFC 1/7] cpuset write dirty map Christoph Lameter
2007-06-04 19:38   ` Ethan Solomita
2007-06-04 19:52     ` Christoph Lameter
2007-06-25 20:21       ` Ethan Solomita
2007-06-26 19:16         ` Christoph Lameter
2007-06-26 22:22           ` Andrew Morton
2007-06-27  3:18             ` Christoph Lameter
2007-06-27  9:14               ` Andrew Morton
2007-06-27 12:44                 ` Christoph Lameter
2007-06-27 21:10                   ` Mel Gorman
2007-06-27 18:17             ` Ethan Solomita
2007-06-27 21:38               ` Christoph Lameter
2007-07-01  2:57                 ` Ethan Solomita
2007-07-03 18:09                   ` Christoph Lameter
2007-07-11 19:18           ` Ethan Solomita
2007-07-11 20:11             ` Christoph Lameter
2007-07-12  1:07               ` Ethan Solomita

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=465FB966.5020808@google.com \
    --to=solo@google.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@google.com \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).