From: Paul E. McKenney Date: Tue, 8 Jun 2021 04:57:02 +0000 (-0700) Subject: rcu: Make rcu_gp_init() and rcu_gp_fqs_loop noinline to conserve stack X-Git-Tag: accepted/tizen/unified/20230118.172025~6579^2^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f74126dcbcbffe0d9fc3cb9bbf171b124a6791e5;p=platform%2Fkernel%2Flinux-rpi.git rcu: Make rcu_gp_init() and rcu_gp_fqs_loop noinline to conserve stack The kbuild test project found an oversized stack frame in rcu_gp_kthread() for some kernel configurations. This oversizing was due to a very large amount of inlining, which is unnecessary due to the fact that this code executes infrequently. This commit therefore marks rcu_gp_init() and rcu_gp_fqs_loop noinline_for_stack to conserve stack space. Reported-by: kernel test robot Tested-by: Rong Chen [ paulmck: noinline_for_stack per Nathan Chancellor. ] Reviewed-by: Nathan Chancellor Signed-off-by: Paul E. McKenney --- diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 381ebd3..d791c4d 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -1733,7 +1733,7 @@ static void rcu_strict_gp_boundary(void *unused) /* * Initialize a new grace period. Return false if no grace period required. */ -static bool rcu_gp_init(void) +static noinline_for_stack bool rcu_gp_init(void) { unsigned long firstseq; unsigned long flags; @@ -1927,7 +1927,7 @@ static void rcu_gp_fqs(bool first_time) /* * Loop doing repeated quiescent-state forcing until the grace period ends. */ -static void rcu_gp_fqs_loop(void) +static noinline_for_stack void rcu_gp_fqs_loop(void) { bool first_gp_fqs; int gf = 0;