From: Balbir Singh Date: Tue, 29 Apr 2008 08:00:23 +0000 (-0700) Subject: memcgroup: make the memory controller more desktop responsive X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=4a56d02e34baedbea5eb1fd558f2b856b8c7db1e;p=openwrt%2Fstaging%2Fblogic.git memcgroup: make the memory controller more desktop responsive This patch makes the memory controller more responsive on my desktop. 1. Set all cached pages as inactive. We were by default marking all pages as active, thus forcing us to go through two passes for reclaiming pages 2. Remove congestion_wait(), since we already have that logic in do_try_to_free_pages() Signed-off-by: Balbir Singh Reviewed-by: KOSAKI Motohiro Cc: YAMAMOTO Takashi Cc: Paul Menage Cc: Pavel Emelianov Cc: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 395fd8e4166a..c5285afe2048 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -591,7 +591,6 @@ retry: mem_cgroup_out_of_memory(mem, gfp_mask); goto out; } - congestion_wait(WRITE, HZ/10); } pc->ref_cnt = 1; @@ -599,7 +598,7 @@ retry: pc->page = page; pc->flags = PAGE_CGROUP_FLAG_ACTIVE; if (ctype == MEM_CGROUP_CHARGE_TYPE_CACHE) - pc->flags |= PAGE_CGROUP_FLAG_CACHE; + pc->flags = PAGE_CGROUP_FLAG_CACHE; lock_page_cgroup(page); if (page_get_page_cgroup(page)) {