[lkml]   [2018]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 3/9] nvme: change namespaces_mutext to namespaces_rwsem
Hi Sagi

Thanks for your kindly response.
And sorry for my bad description.

On 02/11/2018 07:17 PM, Sagi Grimberg wrote:
>> namespaces_mutext is used to synchronize the operations on ctrl
>> namespaces list. Most of the time, it is a read operation. It is
>> better to change it from mutex to rwsem.
>> On the other hand, the namespaces mutex could introduce circular
>> dependency easily.
> On the other hand of what?
> Also, can you give an example of such?

We have a lot of interface in nvme core that need to hold this
namespace_mutex and looks like we will have more.
The mutex will trouble us in following scenario.

For example:

context A context B
nvme_xxx_xxx nvme_xxx_xxx
-> hold namespace_mutex -> try to require namespace_mutex
-> sync context B

Keith's patch will incur this.

Because I add a interface that will hold namespace_mutex, so I add this patchset here.

> _______________________________________________
> Linux-nvme mailing list

 \ /
  Last update: 2018-02-12 03:36    [W:14.212 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site