[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191031100806.1326-1-laijs@linux.alibaba.com>
Date: Thu, 31 Oct 2019 10:07:55 +0000
From: Lai Jiangshan <laijs@...ux.alibaba.com>
To: linux-kernel@...r.kernel.org
Cc: Lai Jiangshan <laijs@...ux.alibaba.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
"Paul E. McKenney" <paulmck@...nel.org>,
Josh Triplett <josh@...htriplett.org>,
Steven Rostedt <rostedt@...dmis.org>,
Lai Jiangshan <jiangshanlai@...il.com>,
Joel Fernandes <joel@...lfernandes.org>,
Peter Zijlstra <peterz@...radead.org>, rcu@...r.kernel.org,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Subject: [PATCH 00/11] rcu: introduce percpu rcu_preempt_depth
My mind was occupied with percpu rcu_preempt_depth for
several years since Peter introduced percu preempt_count.
But it was stopped by no good way to avoid the scheduler deadlocks.
Now we have deferred_qs to avoid the deadlocks, it is time to implement it.
During the work, I found two possible? drawbacks (fixed by patch1/2
but patch2 is reverted by patch8 which is a better way).
And my not noticing the order of handling special.b.deferred_qs
ate many debuging energy (patch7).
The percpu rcu_preempt_depth patch is the last patch, patch11.
x86 is the only beneficial arch. But other arch can put
->rcu_read_lock_nesting and ->rcu_read_unlock_special to
thread_info to avoid the function call after we have patch8/9.
CC: Thomas Gleixner <tglx@...utronix.de>
CC: Ingo Molnar <mingo@...hat.com>
CC: "H. Peter Anvin" <hpa@...or.com>
CC: x86@...nel.org
CC: "Paul E. McKenney" <paulmck@...nel.org>
CC: Josh Triplett <josh@...htriplett.org>
CC: Steven Rostedt <rostedt@...dmis.org>
CC: Lai Jiangshan <jiangshanlai@...il.com>
CC: Joel Fernandes <joel@...lfernandes.org>
CC: Peter Zijlstra <peterz@...radead.org>
CC: linux-kernel@...r.kernel.org
CC: rcu@...r.kernel.org
Lai Jiangshan (11):
rcu: avoid leaking exp_deferred_qs into next GP
rcu: fix bug when rcu_exp_handler() in nested interrupt
rcu: clean up rcu_preempt_deferred_qs_irqrestore()
rcu: cleanup rcu_preempt_deferred_qs()
rcu: clean all rcu_read_unlock_special after report qs
rcu: clear t->rcu_read_unlock_special in one go
rcu: set special.b.deferred_qs before wake_up()
rcu: don't use negative ->rcu_read_lock_nesting
rcu: wrap usages of rcu_read_lock_nesting
rcu: clear the special.b.need_qs in rcu_note_context_switch()
x86,rcu: use percpu rcu_preempt_depth
arch/x86/Kconfig | 2 +
arch/x86/include/asm/rcu_preempt_depth.h | 87 +++++++++++++++
arch/x86/kernel/cpu/common.c | 7 ++
arch/x86/kernel/process_32.c | 2 +
arch/x86/kernel/process_64.c | 2 +
include/linux/rcupdate.h | 24 +++++
init/init_task.c | 2 +-
kernel/fork.c | 2 +-
kernel/rcu/Kconfig | 3 +
kernel/rcu/tree_exp.h | 58 ++++------
kernel/rcu/tree_plugin.h | 130 +++++++++++++----------
11 files changed, 220 insertions(+), 99 deletions(-)
create mode 100644 arch/x86/include/asm/rcu_preempt_depth.h
--
2.20.1
Powered by blists - more mailing lists