[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 16/16] virtio: make it possible to detach host notifier fr
From: |
Juan Quintela |
Subject: |
Re: [PATCH v2 16/16] virtio: make it possible to detach host notifier from any thread |
Date: |
Thu, 20 Apr 2023 14:20:40 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Stefan Hajnoczi <stefanha@gmail.com> wrote:
> On Wed, 19 Apr 2023 at 14:52, Eric Blake <eblake@redhat.com> wrote:
>>
>> On Wed, Apr 19, 2023 at 01:28:17PM -0400, Stefan Hajnoczi wrote:
>> > virtio_queue_aio_detach_host_notifier() does two things:
>> > 1. It removes the fd handler from the event loop.
>> > 2. It processes the virtqueue one last time.
>> >
>> > The first step can be peformed by any thread and without taking the
>> > AioContext lock.
>> >
>> > The second step may need the AioContext lock (depending on the device
>> > implementation) and runs in the thread where request processing takes
>> > place. virtio-blk and virtio-scsi therefore call
>> > virtio_queue_aio_detach_host_notifier() from a BH that is scheduled in
>> > AioContext
>> >
>> > Scheduling a BH is undesirable for .drained_begin() functions. The next
>> > patch will introduce a .drained_begin() function that needs to call
>> > virtio_queue_aio_detach_host_notifier().
>> >
>> > Move the virtqueue processing out to the callers of
>> > virtio_queue_aio_detach_host_notifier() so that the function can be
>> > called from any thread. This is in preparation for the next patch.
>> >
>>
>> This mentions a next patch, but is 16/16 in the series. Am I missing
>> something?
>
> Good thing you caught this. The patch series was truncated because I
> was in the middle of git rebase -i :(.
>
> I will send a v3 with the remaining patches.
I saw that it was not migration/* stuff and though that I was done O:-)
- Re: [PATCH v2 08/16] hw/xen: do not use aio_set_fd_handler(is_external=true) in xen_xenstore, (continued)
- [PATCH v2 10/16] block: drain from main loop thread in bdrv_co_yield_to_drain(), Stefan Hajnoczi, 2023/04/19
- [PATCH v2 11/16] xen-block: implement BlockDevOps->drained_begin(), Stefan Hajnoczi, 2023/04/19
- [PATCH v2 12/16] hw/xen: do not set is_external=true on evtchn fds, Stefan Hajnoczi, 2023/04/19
- [PATCH v2 13/16] block/export: rewrite vduse-blk drain code, Stefan Hajnoczi, 2023/04/19
- [PATCH v2 14/16] block/export: don't require AioContext lock around blk_exp_ref/unref(), Stefan Hajnoczi, 2023/04/19
- [PATCH v2 15/16] block/fuse: do not set is_external=true on FUSE fd, Stefan Hajnoczi, 2023/04/19
- [PATCH v2 16/16] virtio: make it possible to detach host notifier from any thread, Stefan Hajnoczi, 2023/04/19