diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2026-05-19 21:01:28 +0200 |
|---|---|---|
| committer | Uladzislau Rezki (Sony) <urezki@gmail.com> | 2026-06-02 19:43:53 +0200 |
| commit | 002668809b068c528838c1ab1ff46c87bdbb095d (patch) | |
| tree | c72630b9d6ed67ba40b6fbf414dcd8d46fa3c6f4 /drivers/platform/wmi/tests/git@git.tavy.me:linux.git | |
| parent | 42c5468f9cdc0c892fec3c0916b3ac5b670775af (diff) | |
rcu/nocb: reduce stack usage in nocb_gp_wait()
When CONFIG_UBSAN_ALIGNMENT is enabled, the stack usage of nocb_gp_wait()
grows above typical warning limits:
In file included from kernel/rcu/tree.c:4930:
kernel/rcu/tree_nocb.h: In function 'rcu_nocb_gp_kthread':
kernel/rcu/tree_nocb.h:866:1: error: the frame size of 1968 bytes is larger than 1280 bytes [-Werror=frame-larger-than=]
Apparently, the problem is passing rcu_data from a 'void *' pointer,
which gcc assumes may be misaligned. When the function is not inlined
into rcu_nocb_gp_kthread(), that is no longer visible to gcc.
Add a 'noinline_for_stack' annotation that leads to skipping a lot of
the alignment sanitizer checks and keeps the stack usage 60% lower here.
Reviewed-by: Kunwu Chan <chentao@kylinos.cn>
Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Diffstat (limited to 'drivers/platform/wmi/tests/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
