qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH v2] nvme: correct locking around completion


From: Paolo Bonzini
Subject: Re: [Qemu-block] [PATCH v2] nvme: correct locking around completion
Date: Tue, 14 Aug 2018 10:06:07 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 14/08/2018 08:45, Fam Zheng wrote:
> On Tue, 08/14 08:27, Paolo Bonzini wrote:
>> nvme_poll_queues is already protected by q->lock, and
>> AIO callbacks are invoked outside the AioContext lock.
>> So remove the acquire/release pair in nvme_handle_event.
>>
>> Signed-off-by: Paolo Bonzini <address@hidden>
>> ---
>>  block/nvme.c | 2 --
>>  1 file changed, 2 deletions(-)
>>
>> diff --git a/block/nvme.c b/block/nvme.c
>> index 6f71122bf5..42116907ed 100644
>> --- a/block/nvme.c
>> +++ b/block/nvme.c
>> @@ -489,10 +489,8 @@ static void nvme_handle_event(EventNotifier *n)
>>      BDRVNVMeState *s = container_of(n, BDRVNVMeState, irq_notifier);
>>  
>>      trace_nvme_handle_event(s);
>> -    aio_context_acquire(s->aio_context);
>>      event_notifier_test_and_clear(n);
>>      nvme_poll_queues(s);
>> -    aio_context_release(s->aio_context);
>>  }
>>  
>>  static bool nvme_add_io_queue(BlockDriverState *bs, Error **errp)
>> -- 
>> 2.17.1
>>
> 
> This patch and the other
> 
>     [PATCH v2] nvme: simplify code around completion
> 
> only differ in subject. Which one to ignore? :)

"Correct locking" is better.  I thought I had hit Ctrl-C in time. :)

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]