All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ethan Solomita <solo@google.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>,
	Christoph Lameter <clameter@sgi.com>
Subject: [PATCH 5/6] cpuset write vm writeout
Date: Tue, 11 Sep 2007 18:41:04 -0700	[thread overview]
Message-ID: <46E743B0.6070308@google.com> (raw)
In-Reply-To: <46E741B1.4030100@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.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Acked-by: Ethan Solomita <solo@google.com>

---

Patch against 2.6.23-rc4-mm1

diff -uprN -X 0/Documentation/dontdiff 4/include/linux/writeback.h 5/include/linux/writeback.h
--- 4/include/linux/writeback.h	2007-09-11 14:49:47.000000000 -0700
+++ 5/include/linux/writeback.h	2007-09-11 14:50:52.000000000 -0700
@@ -94,7 +94,7 @@ static inline void inode_sync_wait(struc
 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-09-11 14:49:47.000000000 -0700
+++ 5/mm/page-writeback.c	2007-09-11 14:50:52.000000000 -0700
@@ -386,7 +386,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;
 
@@ -401,7 +401,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-09-11 14:50:41.000000000 -0700
+++ 5/mm/vmscan.c	2007-09-11 14:50:52.000000000 -0700
@@ -1185,7 +1185,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;


WARNING: multiple messages have this Message-ID (diff)
From: Ethan Solomita <solo@google.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>,
	Christoph Lameter <clameter@sgi.com>
Subject: [PATCH 5/6] cpuset write vm writeout
Date: Tue, 11 Sep 2007 18:41:04 -0700	[thread overview]
Message-ID: <46E743B0.6070308@google.com> (raw)
In-Reply-To: <46E741B1.4030100@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.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Acked-by: Ethan Solomita <solo@google.com>

---

Patch against 2.6.23-rc4-mm1

diff -uprN -X 0/Documentation/dontdiff 4/include/linux/writeback.h 5/include/linux/writeback.h
--- 4/include/linux/writeback.h	2007-09-11 14:49:47.000000000 -0700
+++ 5/include/linux/writeback.h	2007-09-11 14:50:52.000000000 -0700
@@ -94,7 +94,7 @@ static inline void inode_sync_wait(struc
 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-09-11 14:49:47.000000000 -0700
+++ 5/mm/page-writeback.c	2007-09-11 14:50:52.000000000 -0700
@@ -386,7 +386,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;
 
@@ -401,7 +401,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-09-11 14:50:41.000000000 -0700
+++ 5/mm/vmscan.c	2007-09-11 14:50:52.000000000 -0700
@@ -1185,7 +1185,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;

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

  parent reply	other threads:[~2007-09-12  1:42 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-17 21:23 [PATCH 0/6] cpuset aware writeback Ethan Solomita
2007-07-17 21:23 ` Ethan Solomita
2007-07-17 21:32 ` [PATCH 1/6] cpuset write dirty map Ethan Solomita
2007-07-17 21:32   ` Ethan Solomita
2007-07-17 21:33 ` [PATCH 2/6] cpuset write pdflush nodemask Ethan Solomita
2007-07-17 21:33   ` Ethan Solomita
2007-07-17 21:34 ` [PATCH 3/6] cpuset write throttle Ethan Solomita
2007-07-17 21:34   ` Ethan Solomita
2007-07-17 21:35 ` [PATCH 4/6] cpuset write vmscan Ethan Solomita
2007-07-17 21:35   ` Ethan Solomita
2007-07-17 21:36 ` [PATCH 5/6] cpuset write vm writeout Ethan Solomita
2007-07-17 21:36   ` Ethan Solomita
2007-07-17 21:37 ` [PATCH 6/6] cpuset dirty limits Ethan Solomita
2007-07-17 21:37   ` Ethan Solomita
2007-07-23 20:18 ` [PATCH 0/6] cpuset aware writeback Christoph Lameter
2007-07-23 20:18   ` Christoph Lameter
2007-07-23 21:30   ` Ethan Solomita
2007-07-23 21:30     ` Ethan Solomita
2007-07-23 21:53     ` Christoph Lameter
2007-07-23 21:53       ` Christoph Lameter
2007-09-12  1:32 ` Ethan Solomita
2007-09-12  1:32   ` Ethan Solomita
2007-09-12  1:36   ` [PATCH 1/6] cpuset write dirty map Ethan Solomita
2007-09-14 23:15     ` Andrew Morton
2007-09-14 23:15       ` Andrew Morton
2007-09-14 23:47       ` Satyam Sharma
2007-09-14 23:47         ` Satyam Sharma
2007-09-15  0:07         ` Andrew Morton
2007-09-15  0:07           ` Andrew Morton
2007-09-15  0:16           ` Satyam Sharma
2007-09-15  0:16             ` Satyam Sharma
2007-09-17 18:37             ` Mike Travis
2007-09-17 18:37               ` Mike Travis
2007-09-17 19:10       ` Christoph Lameter
2007-09-17 19:10         ` Christoph Lameter
2007-09-19  0:51       ` Ethan Solomita
2007-09-19  0:51         ` Ethan Solomita
2007-09-19  2:14         ` Andrew Morton
2007-09-19  2:14           ` Andrew Morton
2007-09-19 17:08           ` Christoph Lameter
2007-09-19 17:08             ` Christoph Lameter
2007-09-19 17:06         ` Christoph Lameter
2007-09-19 17:06           ` Christoph Lameter
2007-09-12  1:38   ` [PATCH 2/6] cpuset write pdflush nodemask Ethan Solomita
2007-09-12  1:38     ` Ethan Solomita
2007-09-12  1:39   ` [PATCH 3/6] cpuset write throttle Ethan Solomita
2007-09-12  1:39     ` Ethan Solomita
     [not found]     ` <20070914161517.5ea3847f.akpm@linux-foundation.org>
2007-10-03  0:38       ` Ethan Solomita
2007-10-03 17:46         ` Christoph Lameter
2007-10-03 20:46           ` Ethan Solomita
2007-10-04  3:56             ` Christoph Lameter
2007-10-04  7:37               ` Peter Zijlstra
2007-10-04  7:56                 ` Paul Jackson
2007-10-04  8:15                   ` Peter Zijlstra
2007-10-04  8:25                     ` Peter Zijlstra
2007-10-04  9:06                       ` Paul Jackson
2007-10-04  9:04                     ` Paul Jackson
2007-10-05 19:34                 ` Ethan Solomita
2007-09-12  1:40   ` [PATCH 4/6] cpuset write vmscan Ethan Solomita
2007-09-12  1:40     ` Ethan Solomita
2007-09-12  1:41   ` Ethan Solomita [this message]
2007-09-12  1:41     ` [PATCH 5/6] cpuset write vm writeout Ethan Solomita
2007-09-12  1:42   ` [PATCH 6/6] cpuset dirty limits Ethan Solomita
2007-09-12  1:42     ` Ethan Solomita
2007-09-14 23:15     ` Andrew Morton
2007-09-14 23:15       ` Andrew Morton
2007-09-17 19:00       ` Christoph Lameter
2007-09-17 19:00         ` Christoph Lameter
2007-09-19  0:23         ` Ethan Solomita
2007-09-19  0:23           ` 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=46E743B0.6070308@google.com \
    --to=solo@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=clameter@sgi.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 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.