Thread (12 messages) 12 messages, 4 authors, 2019-03-28

RE: [PATCH RT] nvdimm: make lane acquirement RT aware

From: Liu, Yongxin <hidden>
Date: 2019-03-18 11:49:18
Also in: lkml, nvdimm

-----Original Message-----
From: linux-kernel-owner@vger.kernel.org [mailto:linux-kernel-
owner@vger.kernel.org] On Behalf Of Sebastian Andrzej Siewior
Sent: Monday, March 18, 2019 19:40
To: Liu, Yongxin
Cc: linux-kernel@vger.kernel.org; linux-rt-users@vger.kernel.org;
tglx@linutronix.de; rostedt@goodmis.org; dan.j.williams@intel.com;
pagupta@redhat.com; Gortmaker, Paul; linux-nvdimm@lists.01.org
Subject: Re: [PATCH RT] nvdimm: make lane acquirement RT aware

On 2019-03-18 01:41:10 [+0000], Liu, Yongxin wrote:
quoted
Consider the recursive call to nd_region_acquire_lane() in the
following situation.
quoted
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?
Not easily. I don't have test case for recursive call. 
For now, just code analysis.


Yongxin
quoted
Thanks,
Yognxin
Sebastian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help