[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121210182115.GA30892@redhat.com>
Date: Mon, 10 Dec 2012 19:21:15 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: "Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>,
tj@...nel.org, tglx@...utronix.de, peterz@...radead.org,
paulmck@...ux.vnet.ibm.com, rusty@...tcorp.com.au,
mingo@...nel.org, akpm@...ux-foundation.org, namhyung@...nel.org,
vincent.guittot@...aro.org, sbw@....edu, amit.kucheria@...aro.org,
rjw@...k.pl, wangyun@...ux.vnet.ibm.com,
xiaoguangrong@...ux.vnet.ibm.com, nikunj@...ux.vnet.ibm.com,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH v2 01/10] CPU hotplug: Provide APIs for "light"
atomic readers to prevent CPU offline
On 12/07, Oleg Nesterov wrote:
>
> On 12/06, Steven Rostedt wrote:
> >
> > You know reader locks can deadlock with each other, right? And this
> > isn't caught be lockdep yet. This is because rwlocks have been made to
> > be fair with writers. Before writers could be starved if a CPU always
> > let a reader in. Now if a writer is waiting, a reader will block behind
> > the writer. But this has introduced new issues with the kernel as
> > follows:
> >
> >
> > CPU0 CPU1 CPU2 CPU3
> > ---- ---- ---- ----
> > read_lock(A);
> > read_lock(B)
> > write_lock(A) <- block
> > write_lock(B) <- block
> > read_lock(B) <-block
> >
> > read_lock(A) <- block
> >
> > DEADLOCK!
>
> Really??? Oh I didn't know...
>
> Yes this was always true for rwsem, but rwlock_t?
Sorry, please ignore my email. I misread your email.
Oleg.
--
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