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
1733/*1733/*
1734 * Initialize a new grace period. Return false if no grace period required.1734 * Initialize a new grace period. Return false if no grace period required.
1735 */1735 */
1736static bool rcu_gp_init(void)1736static noinline_for_stack bool rcu_gp_init(void)
1737{1737{
1738 unsigned long firstseq;1738 unsigned long firstseq;
1739 unsigned long flags;1739 unsigned long flags;
@@ -1927,7 +1927,7 @@ static void rcu_gp_fqs(bool first_time) · 187 unmodified lines
1927/*1927/*
1928 * Loop doing repeated quiescent-state forcing until the grace period ends.1928 * Loop doing repeated quiescent-state forcing until the grace period ends.
1929 */1929 */
1930static void rcu_gp_fqs_loop(void)1930static noinline_for_stack void rcu_gp_fqs_loop(void)
1931{1931{
1932 bool first_gp_fqs;1932 bool first_gp_fqs;
1933 int gf = 0;1933 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