Johannes Weiner 1be334e5c0 mm/page_alloc.c: ratelimit allocation failure warnings more aggressively
While investigating a bug related to higher atomic allocation failures,
we noticed the failure warnings positively drowning the console, and in
our case trigger lockup warnings because of a serial console too slow to
handle all that output.

But even if we had a faster console, it's unclear what additional
information the current level of repetition provides.

Allocation failures happen for three reasons: The machine is OOM, the VM
is failing to handle reasonable requests, or somebody is making
unreasonable requests (and didn't acknowledge their opportunism with
__GFP_NOWARN).  Having the memory dump, a callstack, and the ratelimit
stats on skipped failure warnings should provide enough information to
let users/admins/developers know whether something is wrong and point
them in the right direction for debugging, bpftracing etc.

Limit allocation failure warnings to one spew every ten seconds.

Link: http://lkml.kernel.org/r/20191028194906.26899-1-hannes@cmpxchg.org
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-11-06 08:47:50 -08:00
..
2019-09-24 15:54:08 -07:00
2019-08-30 22:43:58 -07:00
2019-09-24 15:54:08 -07:00
2019-09-25 17:51:41 -07:00
2019-09-24 15:54:08 -07:00
2019-09-25 17:51:41 -07:00
2018-06-07 17:34:36 -07:00
2019-07-12 11:05:43 -07:00
2019-09-24 15:54:08 -07:00
2019-09-04 13:40:49 -07:00
2019-10-07 15:47:19 -07:00
2019-09-25 17:51:41 -07:00
2019-09-17 15:20:17 -07:00
2019-09-24 15:54:12 -07:00