[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190318114017.tazjaegln2obt3zg@linutronix.de>
Date: Mon, 18 Mar 2019 12:40:17 +0100
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: "Liu, Yongxin" <Yongxin.Liu@...driver.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-rt-users@...r.kernel.org" <linux-rt-users@...r.kernel.org>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"rostedt@...dmis.org" <rostedt@...dmis.org>,
"dan.j.williams@...el.com" <dan.j.williams@...el.com>,
"pagupta@...hat.com" <pagupta@...hat.com>,
"Gortmaker, Paul" <Paul.Gortmaker@...driver.com>,
"linux-nvdimm@...ts.01.org" <linux-nvdimm@...ts.01.org>
Subject: Re: [PATCH RT] nvdimm: make lane acquirement RT aware
On 2019-03-18 01:41:10 [+0000], Liu, Yongxin wrote:
>
> Consider the recursive call to nd_region_acquire_lane() in the following situation.
> Will there be a dead lock?
>
>
> Thread A Thread B
> | |
> | |
> CPU 1 CPU 2
> | |
> | |
> get lock for Lane 1 get lock for Lane 2
> | |
> | |
> migrate to CPU 2 migrate to CPU 1
> | |
> | |
> wait lock for Lane 2 wait lock for Lane 1
> | |
> | |
> _____________________________
> |
> dead lock ?
Bummer. That would dead lock indeed.
Is it easily possible to recognize the recursive case?
>
> Thanks,
> Yognxin
Sebastian
Powered by blists - more mailing lists