Files
linux/lib
Kevin Hao 037eb35ca8 dump_stack: avoid the livelock of the dump_lock
commit 5cbf2fff3b upstream.

In the current code, we use the atomic_cmpxchg() to serialize the output
of the dump_stack(), but this implementation suffers the thundering herd
problem.  We have observed such kind of livelock on a Marvell cn96xx
board(24 cpus) when heavily using the dump_stack() in a kprobe handler.
Actually we can let the competitors to wait for the releasing of the
lock before jumping to atomic_cmpxchg().  This will definitely mitigate
the thundering herd problem.  Thanks Linus for the suggestion.

[akpm@linux-foundation.org: fix comment]
Link: http://lkml.kernel.org/r/20191030031637.6025-1-haokexin@gmail.com
Fixes: b58d977432 ("dump_stack: serialize the output from dump_stack()")
Signed-off-by: Kevin Hao <haokexin@gmail.com>
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-15 14:57:52 +09:00
..
2014-10-09 11:35:48 +03:00
2017-09-02 07:07:54 +02:00
2023-05-15 13:57:23 +09:00
2011-03-11 14:25:50 +00:00
2016-10-11 15:06:30 -07:00
2015-11-23 09:44:58 +01:00
2016-03-17 15:09:34 -07:00
2011-10-29 21:20:22 +02:00
2006-06-25 10:01:20 -07:00
2006-06-25 10:01:20 -07:00
2016-02-07 23:17:59 -08:00
2017-10-30 09:27:09 +01:00
2023-05-15 12:23:19 +09:00
2014-04-30 19:49:37 +01:00
2014-08-06 18:01:25 -07:00
2017-04-21 09:31:21 +02:00
2016-05-23 17:04:14 -07:00
2014-08-08 15:57:25 -07:00
2023-05-15 10:05:40 +09:00
2016-03-09 15:43:42 -08:00
2015-02-12 18:54:15 -08:00
2012-07-30 17:25:16 -07:00
2014-06-25 17:45:43 -07:00
2016-04-23 20:13:24 -04:00
2015-02-12 18:54:16 -08:00
2016-07-06 10:51:14 +01:00
2023-05-15 09:02:12 +09:00
2016-09-19 08:19:40 -06:00
2015-03-23 22:12:08 -04:00
2017-08-22 05:35:03 -07:00
2015-06-25 17:00:40 -07:00
2023-05-15 10:26:53 +09:00
2016-05-30 15:26:57 -07:00