On Mon, 9 May 2011 11:20:31 +0900 (JST) KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx> wrote: > > I changed the logic a little and add a filter for skipping nodes. > > With large NUMA, tasks may under cpuset or mempolicy and the usage of memory > > can be unbalanced. So, I think a filter is required. > > > > == > > Now, memory cgroup's direct reclaim frees memory from the current node. > > But this has some troubles. In usual, when a set of threads works in > > cooperative way, they are tend to on the same node. So, if they hit > > limits under memcg, it will reclaim memory from themselves, it may be > > active working set. > > > > For example, assume 2 node system which has Node 0 and Node 1 > > and a memcg which has 1G limit. After some work, file cacne remains and > > and usages are > > Node 0: 1M > > Node 1: 998M. > > > > and run an application on Node 0, it will eats its foot before freeing > > unnecessary file caches. > > > > This patch adds round-robin for NUMA and adds equal pressure to each > > node. When using cpuset's spread memory feature, this will work very well. > > Looks nice. And it would be more nice if global reclaim has the same feature. > Do you have a plan to do it? > Hmm, IIUC, at allocating memory for file-cache, we may be able to avoid starting from current node. But, isn't it be a feature of cpuset ? If cpuset.memory_spread_page==1 and a page for file is allocated from a node in round-robin, and memory reclaim runs in such manner (using node-only zonelist fallabck). Do you mean the kernel should have a knob for allowing non-local allocation for file caches even without cpuset ? Thanks, -Kame -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxxx 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@xxxxxxxxx"> email@xxxxxxxxx </a>