[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090518144039.GA6768@linux.vnet.ibm.com>
Date: Mon, 18 May 2009 07:40:39 -0700
From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To: Lai Jiangshan <laijs@...fujitsu.com>
Cc: linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
netfilter-devel@...r.kernel.org, mingo@...e.hu,
akpm@...ux-foundation.org, torvalds@...ux-foundation.org,
davem@...emloft.net, dada1@...mosbay.com, zbr@...emap.net,
jeff.chua.linux@...il.com, paulus@...ba.org, jengelh@...ozas.de,
r000n@...0n.net, benh@...nel.crashing.org,
mathieu.desnoyers@...ymtl.ca
Subject: Re: [PATCH RFC] v5 expedited "big hammer" RCU grace periods
On Mon, May 18, 2009 at 02:59:52PM +0800, Lai Jiangshan wrote:
> Paul E. McKenney wrote:
> > +void sched_expedited_wake(void *unused)
> > +{
> > + mutex_lock(&__get_cpu_var(sched_expedited_done_mutex));
> > + if (__get_cpu_var(sched_expedited_done_qs) ==
> > + SCHED_EXPEDITED_QS_DONE_QS) {
> > + __get_cpu_var(sched_expedited_done_qs) =
> > + SCHED_EXPEDITED_QS_NEED_QS;
> > + wake_up(&__get_cpu_var(sched_expedited_qs_wq));
> > + }
> > + mutex_unlock(&__get_cpu_var(sched_expedited_done_mutex));
> > +}
>
> [...]
>
> > + get_online_cpus();
> > + preempt_disable();
> > + mycpu = smp_processor_id();
> > + smp_call_function(sched_expedited_wake, NULL, 1);
>
> sched_expedited_wake() calls mutex_lock() which may sleep?
Good eyes! Fixing this and the failure to release this lock in
krcu_sched_expedited_percpu() allows it to survive 10 hours of
rcutorture running in parallel with onlining/offlining random CPUs.
> And I think you have re-implement workqueue.
Hmmm... I suppose I could use schedule_work(), though I am concerned
about interference from other work. But I will give this some thought.
Thanx, Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists