lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-Id: <1524450747-22778-1-git-send-email-paulmck@linux.vnet.ibm.com> Date: Sun, 22 Apr 2018 19:32:06 -0700 From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com> To: linux-kernel@...r.kernel.org Cc: mingo@...nel.org, jiangshanlai@...il.com, dipankar@...ibm.com, akpm@...ux-foundation.org, mathieu.desnoyers@...icios.com, josh@...htriplett.org, tglx@...utronix.de, peterz@...radead.org, rostedt@...dmis.org, dhowells@...hat.com, edumazet@...gle.com, fweisbec@...il.com, oleg@...hat.com, joel.opensrc@...il.com, "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com> Subject: [PATCH tip/core/rcu 01/22] sched: Make non-production PREEMPT cond_resched() help Tasks RCU In CONFIG_PREEMPT=y kernels, cond_resched() is a complete no-op, and thus cannot help advance Tasks-RCU grace periods. However, such grace periods are only an issue in non-production benchmarking runs of the Linux kernel. This commit therefore makes cond_resched() invoke rcu_note_voluntary_context_switch() for kernels implementing Tasks RCU even in CONFIG_PREEMPT=y kernels. Reported-by: Steven Rostedt <rostedt@...dmis.org> Signed-off-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com> --- include/linux/sched.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/linux/sched.h b/include/linux/sched.h index b3d697f3b573..fe8f7178a22d 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1617,6 +1617,12 @@ static inline int test_tsk_need_resched(struct task_struct *tsk) */ #ifndef CONFIG_PREEMPT extern int _cond_resched(void); +#elif defined(CONFIG_TRACEPOINT_BENCHMARK) +static inline int _cond_resched(void) +{ + rcu_note_voluntary_context_switch(current); + return 0; +} #else static inline int _cond_resched(void) { return 0; } #endif -- 2.5.2
Powered by blists - more mailing lists