History

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.

Paul E. McKenney committed 5 years ago

Commit f74126d1 parent d9ee9621 file · +2 −2Browse files

Unified · Split

kernel/rcu/tree.c+2−2
@@ -1733,7 +1733,7 @@ static void rcu_strict_gp_boundary(void *unused) · 1732 unmodified lines
17331733 /*
17341734 * Initialize a new grace period. Return false if no grace period required.
17351735 */
1736−static bool rcu_gp_init(void)
1736+static noinline_for_stack bool rcu_gp_init(void)
17371737 {
17381738 unsigned long firstseq;
17391739 unsigned long flags;
@@ -1927,7 +1927,7 @@ static void rcu_gp_fqs(bool first_time) · 187 unmodified lines
19271927 /*
19281928 * Loop doing repeated quiescent-state forcing until the grace period ends.
19291929 */
1930−static void rcu_gp_fqs_loop(void)
1930+static noinline_for_stack void rcu_gp_fqs_loop(void)
19311931 {
19321932 bool first_gp_fqs;
19331933 int gf = 0;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t