Thread (11 messages) 11 messages, 2 authors, 2011-08-02

Re: [PATCH v4 2/5] memcg : pass scan nodemask

From: KAMEZAWA Hiroyuki <hidden>
Date: 2011-08-02 02:29:30
Also in: lkml

On Mon, 1 Aug 2011 15:59:53 +0200
Michal Hocko [off-list ref] wrote:
On Wed 27-07-11 14:47:42, KAMEZAWA Hiroyuki wrote:
quoted
pass memcg's nodemask to try_to_free_pages().

try_to_free_pages can take nodemask as its argument but memcg
doesn't pass it. Considering memcg can be used with cpuset on
big NUMA, memcg should pass nodemask if available.

Now, memcg maintain nodemask with periodic updates. pass it.

Signed-off-by: KAMEZAWA Hiroyuki <redacted>
---
 include/linux/memcontrol.h |    2 +-
 mm/memcontrol.c            |    8 ++++++--
 mm/vmscan.c                |    3 ++-
 3 files changed, 9 insertions(+), 4 deletions(-)
[...]
quoted
Index: mmotm-0710/mm/vmscan.c
===================================================================
--- mmotm-0710.orig/mm/vmscan.c
+++ mmotm-0710/mm/vmscan.c
@@ -2280,6 +2280,7 @@ unsigned long try_to_free_mem_cgroup_pag
 	unsigned long nr_reclaimed;
 	unsigned long start, end;
 	int nid;
+	nodemask_t *mask;
 	struct scan_control sc = {
 		.may_writepage = !laptop_mode,
 		.may_unmap = 1,
@@ -2302,7 +2303,7 @@ unsigned long try_to_free_mem_cgroup_pag
 	 * take care of from where we get pages. So the node where we start the
 	 * scan does not need to be the current node.
 	 */
-	nid = mem_cgroup_select_victim_node(mem_cont);
+	nid = mem_cgroup_select_victim_node(mem_cont, &mask);
The mask is not used anywhere AFAICS and using it is a point of the
patch AFAIU. I guess you wanted to use &sc.nodemask, right?

Other than that, looks good to me.

Reviewed-by: Michal Hocko <redacted>
Ah, sorry. I'll fix.

Thanks,
-Kame

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help