diff options
author | Balbir Singh <balbir@linux.vnet.ibm.com> | 2008-04-29 04:00:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 11:06:11 -0400 |
commit | 4a56d02e34baedbea5eb1fd558f2b856b8c7db1e (patch) | |
tree | 212dc2ed8562014963f2bd8b66578a5aa36f426c /mm/memcontrol.c | |
parent | 3eae90c3cdd4e762d0f4f5e939c98780fccded57 (diff) |
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 <balbir@linux.vnet.ibm.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Cc: Paul Menage <menage@google.com>
Cc: Pavel Emelianov <xemul@openvz.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r-- | mm/memcontrol.c | 3 |
1 files changed, 1 insertions, 2 deletions
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: | |||
591 | mem_cgroup_out_of_memory(mem, gfp_mask); | 591 | mem_cgroup_out_of_memory(mem, gfp_mask); |
592 | goto out; | 592 | goto out; |
593 | } | 593 | } |
594 | congestion_wait(WRITE, HZ/10); | ||
595 | } | 594 | } |
596 | 595 | ||
597 | pc->ref_cnt = 1; | 596 | pc->ref_cnt = 1; |
@@ -599,7 +598,7 @@ retry: | |||
599 | pc->page = page; | 598 | pc->page = page; |
600 | pc->flags = PAGE_CGROUP_FLAG_ACTIVE; | 599 | pc->flags = PAGE_CGROUP_FLAG_ACTIVE; |
601 | if (ctype == MEM_CGROUP_CHARGE_TYPE_CACHE) | 600 | if (ctype == MEM_CGROUP_CHARGE_TYPE_CACHE) |
602 | pc->flags |= PAGE_CGROUP_FLAG_CACHE; | 601 | pc->flags = PAGE_CGROUP_FLAG_CACHE; |
603 | 602 | ||
604 | lock_page_cgroup(page); | 603 | lock_page_cgroup(page); |
605 | if (page_get_page_cgroup(page)) { | 604 | if (page_get_page_cgroup(page)) { |