From: Lai Jiangshan <laijs@cn.fujitsu.com>
To: paulmck@linux.vnet.ibm.com
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
netfilter-devel@vger.kernel.org, mingo@elte.hu,
akpm@linux-foundation.org, torvalds@linux-foundation.org,
davem@davemloft.net, dada1@cosmosbay.com, zbr@ioremap.net,
jeff.chua.linux@gmail.com, paulus@samba.org, jengelh@medozas.de,
r000n@r000n.net, benh@kernel.crashing.org,
mathieu.desnoyers@polymtl.ca
Subject: Re: [PATCH RFC] v7 expedited "big hammer" RCU grace periods
Date: Tue, 26 May 2009 09:03:55 +0800 [thread overview]
Message-ID: <4A1B3FFB.7090306@cn.fujitsu.com> (raw)
In-Reply-To: <20090525164446.GD7168@linux.vnet.ibm.com>
Paul E. McKenney wrote:
>
> Good point -- I should at the very least add a comment to
> synchronize_sched_expedited() stating that it cannot be called holding
> any lock that is acquired in a CPU hotplug notifier. If this restriction
> causes any problems, then your approach seems like a promising fix.
Reviewed-by: Lai Jiangshan <laijs@cn.fujitsu.com>
>
>> The coupling of synchronize_sched_expedited() and migration_req
>> is largely increased:
>>
>> 1) The offline cpu's per_cpu(rcu_migration_req, cpu) is handled.
>> See migration_call::CPU_DEAD
>
> Good. ;-)
>
>> 2) migration_call() is the highest priority of cpu notifiers,
>> So even any other cpu notifier calls synchronize_sched_expedited(),
>> It'll not cause DEADLOCK.
>
> You mean if using your preempt_disable() approach, right? Unless I am
> missing something, the current get_online_cpus() approach would deadlock
> in this case.
>
Yes, I mean if using my preempt_disable() approach. The current
get_online_cpus() approach would NOT deadlock in this case also,
we can require get_online_cpus() in cpu notifiers.
> diff --git a/include/linux/rcupreempt.h b/include/linux/rcupreempt.h
> index fce5227..78117ed 100644
> --- a/include/linux/rcupreempt.h
> +++ b/include/linux/rcupreempt.h
> @@ -74,6 +74,16 @@ extern int rcu_needs_cpu(int cpu);
>
> extern void __synchronize_sched(void);
>
> +static inline void synchronize_rcu_expedited(void)
> +{
> + synchronize_rcu(); /* Placeholder for new rcupreempt implementation. */
> +}
> +
> +static inline void synchronize_rcu_bh_expedited(void)
> +{
> + synchronize_rcu(); /* Placeholder for new rcupreempt implementation. */
> +}
> +
Why not synchronize_rcu_bh() ?
In mainline, rcu_read_lock_bh() is not preemptable,
So I think synchronize_sched_expedited() is better.
Anyway, synchronize_rcu() is OK for me, because it is
"Placeholder for new rcupreempt implementation".
Lai
next prev parent reply other threads:[~2009-05-26 1:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-22 19:05 [PATCH RFC] v7 expedited "big hammer" RCU grace periods Paul E. McKenney
2009-05-25 6:35 ` Lai Jiangshan
2009-05-25 16:44 ` Paul E. McKenney
2009-05-26 1:03 ` Lai Jiangshan [this message]
2009-05-26 1:28 ` Paul E. McKenney
2009-05-26 15:46 ` Paul E. McKenney
2009-05-26 16:41 ` Mathieu Desnoyers
2009-05-26 18:13 ` Paul E. McKenney
2009-05-27 1:47 ` Mathieu Desnoyers
2009-05-27 4:27 ` Paul E. McKenney
2009-05-27 14:45 ` Mathieu Desnoyers
2009-05-28 23:52 ` Paul E. McKenney
2009-05-27 1:57 ` Lai Jiangshan
2009-05-27 4:30 ` Paul E. McKenney
2009-05-27 5:37 ` Lai Jiangshan
2009-05-29 0:08 ` 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=4A1B3FFB.7090306@cn.fujitsu.com \
--to=laijs@cn.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=benh@kernel.crashing.org \
--cc=dada1@cosmosbay.com \
--cc=davem@davemloft.net \
--cc=jeff.chua.linux@gmail.com \
--cc=jengelh@medozas.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@polymtl.ca \
--cc=mingo@elte.hu \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=paulus@samba.org \
--cc=r000n@r000n.net \
--cc=torvalds@linux-foundation.org \
--cc=zbr@ioremap.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.