From: "Paul E. McKenney" <paulmck@linux.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: mingo@kernel.org, jiangshanlai@gmail.com, dipankar@in.ibm.com,
akpm@linux-foundation.org, mathieu.desnoyers@efficios.com,
josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org,
rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com,
fweisbec@gmail.com, oleg@redhat.com, joel@joelfernandes.org,
"Paul E. McKenney" <paulmck@linux.ibm.com>
Subject: [PATCH tip/core/rcu 4/8] rcu: Remove preemption disabling from expedited CPU selection
Date: Wed, 9 Jan 2019 13:41:38 -0800 [thread overview]
Message-ID: <20190109214142.4428-4-paulmck@linux.ibm.com> (raw)
In-Reply-To: <20190109214115.GA2835@linux.ibm.com>
It turns out that it is queue_delayed_work_on() rather than
queue_work_on() that has difficulties when used concurrently with
CPU-hotplug removal operations. It is therefore unnecessary to protect
CPU identification and queue_work_on() with preempt_disable().
This commit therefore removes the preempt_disable() and preempt_enable()
from sync_rcu_exp_select_cpus(), which has the further benefit of reducing
the number of changes that must be maintained in the -rt patchset.
Reported-by: Thomas Gleixner <tglx@linutronix.de>
Reported-by: Sebastian Siewior <bigeasy@linutronix.de>
Suggested-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
---
kernel/rcu/tree_exp.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/kernel/rcu/tree_exp.h b/kernel/rcu/tree_exp.h
index 928fe5893a57..f42c999f4d2d 100644
--- a/kernel/rcu/tree_exp.h
+++ b/kernel/rcu/tree_exp.h
@@ -449,7 +449,6 @@ static void sync_rcu_exp_select_cpus(smp_call_func_t func)
continue;
}
INIT_WORK(&rnp->rew.rew_work, sync_rcu_exp_select_node_cpus);
- preempt_disable();
cpu = find_next_bit(&rnp->ffmask, BITS_PER_LONG, -1);
/* If all offline, queue the work on an unbound CPU. */
if (unlikely(cpu > rnp->grphi - rnp->grplo))
@@ -457,7 +456,6 @@ static void sync_rcu_exp_select_cpus(smp_call_func_t func)
else
cpu += rnp->grplo;
queue_work_on(cpu, rcu_par_gp_wq, &rnp->rew.rew_work);
- preempt_enable();
rnp->exp_need_flush = true;
}
--
2.17.1
next prev parent reply other threads:[~2019-01-09 21:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-09 21:41 [PATCH tip/core/rcu 0/8] Miscellaneous fixes for v5.1 Paul E. McKenney
2019-01-09 21:41 ` [PATCH tip/core/rcu 1/8] rcu: Docbook for rcu_head_init() and rcu_head_after_call_rcu() Paul E. McKenney
2019-01-09 21:41 ` [PATCH tip/core/rcu 2/8] rcu: Rename rcu_check_callbacks() to rcu_sched_clock_irq() Paul E. McKenney
2019-01-09 21:41 ` [PATCH tip/core/rcu 3/8] rcu: Rename rcu_process_callbacks() to rcu_core() for Tree RCU Paul E. McKenney
2019-01-09 21:41 ` Paul E. McKenney [this message]
2019-01-09 21:41 ` [PATCH tip/core/rcu 5/8] rcu: Repair rcu_nmi_exit() docbook header Paul E. McKenney
2019-01-09 21:41 ` [PATCH tip/core/rcu 6/8] rcu: Fix obsolete DYNTICK_IRQ_NONIDLE comment Paul E. McKenney
2019-01-09 21:41 ` [PATCH tip/core/rcu 7/8] rcu: Add sparse check to rcu_assign_pointer() Paul E. McKenney
2019-01-09 21:41 ` [PATCH tip/core/rcu 8/8] time: Move CONTEXT_TRACKING to kernel/time/Kconfig Paul E. McKenney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190109214142.4428-4-paulmck@linux.ibm.com \
--to=paulmck@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=dhowells@redhat.com \
--cc=dipankar@in.ibm.com \
--cc=edumazet@google.com \
--cc=fweisbec@gmail.com \
--cc=jiangshanlai@gmail.com \
--cc=joel@joelfernandes.org \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).