lkml.org 
[lkml]   [2019]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2019-03-18 12:40    [W:0.048 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site