From: KAMEZAWA Hiroyuki Date: Wed, 10 Mar 2010 23:22:30 +0000 (-0800) Subject: memcg: update threshold and softlimit at commit X-Git-Tag: v2.6.34-rc2~163 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=430e48631e72aeab74d844c57b441f98a2e36eee;p=pandora-kernel.git memcg: update threshold and softlimit at commit Presently, move_task does "batched" precharge. Because res_counter or css's refcnt are not-scalable jobs for memcg, try_charge_().. tend to be done in batched manner if allowed. Now, softlimit and threshold check their event counter in try_charge, but the charge is not a per-page event. And event counter is not updated at charge(). Moreover, precharge doesn't pass "page" to try_charge() and softlimit tree will be never updated until uncharge() causes an event." So the best place to check the event counter is commit_charge(). This is per-page event by its nature. This patch move checks to there. Signed-off-by: KAMEZAWA Hiroyuki Cc: Kirill A. Shutemov Cc: Balbir Singh Cc: Daisuke Nishimura Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed