Hugh Dickins ca707239e8 mm: update_lru_size warn and reset bad lru_size
Though debug kernels have a VM_BUG_ON to help protect from misaccounting
lru_size, non-debug kernels are liable to wrap it around: and then the
vast unsigned long size draws page reclaim into a loop of repeatedly
doing nothing on an empty list, without even a cond_resched().

That soft lockup looks confusingly like an over-busy reclaim scenario,
with lots of contention on the lru_lock in shrink_inactive_list(): yet
has a totally different origin.

Help differentiate with a custom warning in
mem_cgroup_update_lru_size(), even in non-debug kernels; and reset the
size to avoid the lockup.  But the particular bug which suggested this
change was mine alone, and since fixed.

Make it a WARN_ONCE: the first occurrence is the most informative, a
flurry may follow, yet even when rate-limited little more is learnt.

Signed-off-by: Hugh Dickins <hughd@google.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Andres Lagar-Cavilla <andreslc@google.com>
Cc: Yang Shi <yang.shi@linaro.org>
Cc: Ning Qu <quning@gmail.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Andres Lagar-Cavilla <andreslc@google.com>
Cc: Konstantin Khlebnikov <koct9i@gmail.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-05-19 19:12:14 -07:00
..
2016-05-09 16:18:37 +02:00
2015-10-17 21:22:08 -07:00
2015-10-07 18:08:15 +01:00
2016-03-04 23:50:27 -06:00
2016-05-17 12:29:34 -04:00
2016-05-18 13:14:02 -07:00
2015-12-23 08:37:10 -07:00
2016-03-15 16:55:16 -07:00
2016-02-16 13:04:58 -05:00
2016-05-07 07:06:13 +02:00
2016-02-26 13:28:35 +02:00
2015-12-28 13:41:50 +01:00
2015-11-25 09:22:00 -07:00
2016-04-06 13:18:19 +02:00
2016-03-11 14:58:58 -05:00
2015-10-23 05:44:28 -07:00
2016-02-11 09:59:22 -05:00
2016-03-22 15:36:02 -07:00
2016-03-16 17:45:56 -07:00
2016-05-11 19:31:40 -04:00
2015-10-01 15:06:43 +02:00
2016-01-28 14:19:12 -08:00
2016-03-25 16:37:42 -07:00
2016-03-22 15:36:02 -07:00
2016-03-22 15:36:02 -07:00
2016-01-15 17:56:32 -08:00
2016-03-09 15:43:42 -08:00
2016-01-15 17:56:32 -08:00
2016-03-17 13:47:50 -07:00
2015-10-27 18:55:31 -07:00
2016-05-19 19:12:14 -07:00
2016-05-19 19:12:14 -07:00
2015-10-20 22:10:45 +08:00
2016-05-10 23:56:28 -04:00
2016-03-05 12:24:06 -08:00
2016-03-17 14:57:16 -04:00
2016-05-09 11:39:45 -04:00
2016-04-25 15:09:11 -04:00
2016-02-16 13:04:58 -05:00
2016-05-16 17:17:24 -07:00
2016-05-19 19:12:14 -07:00
2015-09-10 13:29:01 -07:00
2016-02-11 18:35:48 -08:00
2016-02-11 18:35:48 -08:00
2016-03-14 15:43:11 -04:00
2015-10-06 17:08:19 +02:00
2016-02-16 13:04:58 -05:00
2015-10-22 08:59:18 -07:00
2016-05-03 13:44:37 +02:00
2016-03-17 15:09:34 -07:00
2016-03-22 15:36:02 -07:00
2016-03-22 15:36:02 -07:00
2016-03-22 15:36:02 -07:00
2016-01-10 22:13:15 -05:00
2016-05-16 19:17:22 -07:00
2016-01-04 16:11:11 -05:00
2016-05-19 19:12:14 -07:00
2016-05-19 19:12:14 -07:00
2016-03-25 16:37:42 -07:00
2016-05-08 23:46:14 -04:00
2015-11-13 21:53:18 -08:00
2016-05-19 19:12:14 -07:00
2015-10-01 09:57:59 -07:00
2015-10-19 01:01:21 +02:00
2016-04-07 16:53:29 -04:00
2015-11-23 09:44:58 +01:00
2016-02-22 16:10:08 -07:00
2016-01-14 16:00:49 -08:00
2015-12-03 07:24:29 -08:00
2015-09-08 15:35:28 -07:00