Files
kernel_xiaomi_sm8250/include/linux
Daisuke Nishimura ae3abae64f memcg: fix mem_cgroup_shrink_usage()
Current mem_cgroup_shrink_usage() has two problems.

1. It doesn't call mem_cgroup_out_of_memory and doesn't update
   last_oom_jiffies, so pagefault_out_of_memory invokes global OOM.

2. Considering hierarchy, shrinking has to be done from the
   mem_over_limit, not from the memcg which the page would be charged to.

mem_cgroup_try_charge_swapin() does all of these things properly, so we
use it and call cancel_charge_swapin when it succeeded.

The name of "shrink_usage" is not appropriate for this behavior, so we
change it too.

Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Li Zefan <lizf@cn.fujitsu.cn>
Cc: Paul Menage <menage@google.com>
Cc: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-05-02 15:36:09 -07:00
..
2009-01-30 19:50:25 +05:30
2009-04-07 10:23:34 +01:00
2009-03-31 09:56:26 +01:00
2008-02-06 10:41:02 -08:00
2008-07-01 11:28:06 +10:00
2009-01-21 14:02:19 -08:00
2009-04-06 20:00:51 -04:00
2005-04-16 15:20:36 -07:00
2008-12-03 22:12:38 -08:00
2009-04-01 08:59:23 -07:00
2009-04-01 08:59:23 -07:00
2005-04-16 15:20:36 -07:00
2008-10-20 08:52:42 -07:00
2009-04-22 08:35:10 +02:00
2009-04-23 10:06:35 +01:00
2008-06-06 11:29:10 -07:00
2009-04-24 08:54:21 +02:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2008-02-03 17:45:46 +02:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2009-04-03 14:53:32 -07:00
2007-05-08 11:15:26 -07:00
2008-08-28 11:49:15 -05:00
2007-02-09 17:39:36 -05:00
2009-01-30 23:46:03 +05:30
2009-04-03 14:53:32 -07:00
2009-01-30 23:48:33 +05:30
2009-02-10 00:41:26 +01:00
2007-06-01 08:18:29 -07:00
2008-08-20 13:19:51 -07:00
2005-04-16 15:20:36 -07:00
2009-02-18 15:37:56 -08:00
2009-03-30 15:14:53 +02:00
2009-01-30 23:51:17 +05:30
2009-04-03 09:48:29 -07:00
2009-04-08 14:13:03 +02:00
2009-04-02 19:04:53 -07:00
2009-04-13 15:04:29 -07:00
2005-04-16 15:20:36 -07:00
2009-04-21 13:41:48 -07:00
2009-04-21 13:41:48 -07:00
2006-10-04 00:31:09 -07:00
2009-01-30 23:58:41 +05:30
2009-01-30 23:59:44 +05:30
2009-04-02 19:04:49 -07:00
2005-04-16 15:20:36 -07:00
2009-04-06 16:06:26 +01:00
2007-07-17 10:23:03 -07:00
2007-07-17 10:23:13 -07:00
2008-09-01 09:47:16 +02:00
2009-04-01 08:59:17 -07:00
2009-01-21 10:39:51 +01:00
2007-05-09 12:30:49 -07:00
2009-04-07 08:12:38 +02:00
2009-04-02 19:04:48 -07:00
2006-11-30 04:40:22 +01:00
2009-01-14 18:09:02 +01:00
2009-04-03 17:41:23 -07:00
2009-04-01 13:28:15 -04:00
2009-04-03 17:41:12 -07:00
2009-04-01 08:59:13 -07:00
2009-04-01 08:59:13 -07:00
2008-02-14 21:13:33 -08:00
2009-04-13 15:04:32 -07:00
2005-04-16 15:20:36 -07:00
2009-04-13 14:51:23 -07:00
2009-01-08 08:31:12 -08:00
2009-04-24 08:54:21 +02:00
2009-04-01 08:59:13 -07:00
2009-01-06 15:59:12 -08:00
2006-10-03 23:01:26 +02:00
2008-06-11 21:00:38 -07:00
2009-03-30 15:22:01 +02:00
2009-01-31 00:05:59 +05:30
2009-02-26 23:42:11 -08:00
2008-01-30 13:31:47 +01:00
2009-03-30 14:28:58 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2009-04-01 08:59:24 -07:00
2008-07-25 10:53:42 -07:00
2008-04-25 00:25:08 +02:00
2008-02-07 08:42:34 -08:00
2009-04-08 14:33:38 -07:00
2009-04-13 15:04:29 -07:00
2009-04-03 12:23:06 +02:00
2009-04-21 19:40:00 -07:00
2009-04-03 12:23:06 +02:00
2005-04-16 15:20:36 -07:00
2007-05-08 11:15:18 -07:00
2009-04-01 08:59:15 -07:00
2009-04-02 19:05:01 -07:00
2009-01-01 10:12:25 +10:30
2009-02-18 15:37:53 -08:00
2009-04-17 10:50:27 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2007-12-26 19:36:35 -08:00