[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220825092311.179-1-thunder.leizhen@huawei.com>
Date: Thu, 25 Aug 2022 17:23:10 +0800
From: Zhen Lei <thunder.leizhen@...wei.com>
To: "Paul E . McKenney" <paulmck@...nel.org>,
Frederic Weisbecker <frederic@...nel.org>,
Neeraj Upadhyay <quic_neeraju@...cinc.com>,
"Josh Triplett" <josh@...htriplett.org>,
Steven Rostedt <rostedt@...dmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Lai Jiangshan <jiangshanlai@...il.com>,
Joel Fernandes <joel@...lfernandes.org>, <rcu@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
CC: Zhen Lei <thunder.leizhen@...wei.com>
Subject: [PATCH v5 0/1] rcu/nocb: Delete local variable 'need_rcu_nocb_mask' in rcu_init_nohz()
v4 --> v5:
1. Cancel eliminate rcu_state.nocb_is_setup. It is useful for case 1) below.
Test cases and test results as below:
----------------------------------------------------------------------
| CONFIG_NO_HZ_FULL | CONFIG_RCU_NOCB_CPU_DEFAULT_ALL | cmdline |
----------------------------------------------------------------------
1) N | N | none |
2) N | N | rcu_nocbs=1-2 |
3) Y | N | nohz_full=1-2 |
4) Y | Y | none |
----------------------------------------------------------------------
1)
[ 1018.082417] rcu-torture:--- End of test: SUCCESS (default)
root@...ericarmv8:~# dmesg | grep "Offload RCU callbacks"
root@...ericarmv8:~# zcat /proc/config.gz | grep NOCB
CONFIG_RCU_NOCB_CPU=y
# CONFIG_RCU_NOCB_CPU_DEFAULT_ALL is not set
root@...ericarmv8:~# zcat /proc/config.gz | grep NO_HZ_FULL
# CONFIG_NO_HZ_FULL is not set
root@...ericarmv8:~# cat /proc/cmdline
console=ttyS0 earlyprintk=serial root=/dev/sda rw
2) 3) 4)
The same to v4.
v3 --> v4:
Fix a build warning.
- struct cpumask *cpumask = NULL;
+ const struct cpumask *cpumask = NULL;
v2 --> v3:
1. Eliminate rcu_state.nocb_is_setup
2. Update the code based on the above patch and commit b37a667c6242
("rcu/nocb: Add an option to offload all CPUs on boot").
Test cases and test results as below:
----------------------------------------------------------------------
| CONFIG_NO_HZ_FULL | CONFIG_RCU_NOCB_CPU_DEFAULT_ALL | cmdline |
----------------------------------------------------------------------
1) N | N | none |
2) N | N | rcu_nocbs=1-2 |
3) Y | N | nohz_full=1-2 |
4) Y | Y | none |
----------------------------------------------------------------------
1)
[ 1085.691770] rcu-torture:--- End of test: SUCCESS: (default)
root@...ericarmv8:~# dmesg | grep "Offload RCU callbacks"
[ 0.000000] rcu: Offload RCU callbacks from CPUs: (none).
root@...ericarmv8:~# zcat /proc/config.gz | grep NOCB
CONFIG_RCU_NOCB_CPU=y
# CONFIG_RCU_NOCB_CPU_DEFAULT_ALL is not set
root@...ericarmv8:~# zcat /proc/config.gz | grep NO_HZ_FULL
# CONFIG_NO_HZ_FULL is not set
root@...ericarmv8:~# cat /proc/cmdline
console=ttyAMA0 root=/dev/vda2 crashkernel=256M@...00000
2)
[ 1022.532198] rcu-torture:--- End of test: SUCCESS: (default)
root@...ericarmv8:~# dmesg | grep "Offload RCU callbacks"
[ 0.000000] rcu: Offload RCU callbacks from CPUs: 1-2.
root@...ericarmv8:~# zcat /proc/config.gz | grep NOCB
CONFIG_RCU_NOCB_CPU=y
# CONFIG_RCU_NOCB_CPU_DEFAULT_ALL is not set
root@...ericarmv8:~# zcat /proc/config.gz | grep NO_HZ_FULL
# CONFIG_NO_HZ_FULL is not set
root@...ericarmv8:~# cat /proc/cmdline
console=ttyAMA0 root=/dev/vda2 crashkernel=256M@...00000 rcu_nocbs=1-2
3)
[ 1011.714712] rcu-torture:--- End of test: SUCCESS: (default)
root@...ericarmv8:~# dmesg | grep "Offload RCU callbacks"
[ 0.000000] rcu: Offload RCU callbacks from CPUs: 1-2.
root@...ericarmv8:~# zcat /proc/config.gz | grep NOCB
CONFIG_RCU_NOCB_CPU=y
# CONFIG_RCU_NOCB_CPU_DEFAULT_ALL is not set
root@...ericarmv8:~# zcat /proc/config.gz | grep NO_HZ_FULL
CONFIG_NO_HZ_FULL=y
root@...ericarmv8:~# cat /proc/cmdline
console=ttyAMA0 root=/dev/vda2 crashkernel=256M@...00000 nohz_full=1-2
4)
[ 1031.047094] rcu-torture:--- End of test: SUCCESS: (default)
root@...ericarmv8:~# dmesg | grep "Offload RCU callbacks"
[ 0.000000] rcu: Offload RCU callbacks from CPUs: 0-3.
root@...ericarmv8:~# zcat /proc/config.gz | grep NOCB
CONFIG_RCU_NOCB_CPU=y
CONFIG_RCU_NOCB_CPU_DEFAULT_ALL=y
root@...ericarmv8:~# zcat /proc/config.gz | grep NO_HZ_FULL
CONFIG_NO_HZ_FULL=y
root@...ericarmv8:~# cat /proc/cmdline
console=ttyAMA0 root=/dev/vda2 crashkernel=256M@...00000
v1 --> v2:
Update commit message.
Zhen Lei (1):
rcu: Simplify the code logic of rcu_init_nohz()
kernel/rcu/tree_nocb.h | 32 +++++++++-----------------------
1 file changed, 9 insertions(+), 23 deletions(-)
--
2.25.1
Powered by blists - more mailing lists