[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH v6 01/13] block: Add op blocker typ
From: |
Fam Zheng |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH v6 01/13] block: Add op blocker type "device IO" |
Date: |
Thu, 28 May 2015 19:44:54 +0800 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Thu, 05/28 13:24, Kevin Wolf wrote:
> Am 28.05.2015 um 13:00 hat Paolo Bonzini geschrieben:
> > On 28/05/2015 12:55, Fam Zheng wrote:
> > > > Indeed. blk_pause/resume would handle everything in one central place
> > > > in the block layer instead of spreading the logic across all the block
> > > > layer users.
> > >
> > > Sorry, I'm confused. Do you mean there is a way to implement blk_pause
> > > completely in block layer, without the necessity of various notifier
> > > handlers
> > > in device models?
> >
> > How would you do that? Do you have to keep a queue of pending requests
> > in the BlockBackend? Since bdrv_drain_all may never return (e.g. stuck
> > NFS connection with nfs=hard), the guest can force unbounded allocation
> > in the host, which is bad.
>
> We already queue requests for things like I/O throttling or
> serialisation. Why would this be any worse?
>
> > In addition, the BDS doesn't have a list of BlockBackends attached to
> > it. So you need the BlockBackends to register themselves for
> > pause/resume in some way---for example with a notifier list.
> >
> > Then it's irrelevant whether it's the device model or the BB that
> > attaches itself to the notifier list. You can start with doing it in
> > the device models (those that use ioeventfd), and later it can be moved
> > to the BB. The low-level implementation remains the same.
>
> The reason for doing it in the block layer is that it's in one place and
> we can be sure that it's applied. We can still in addition modify
> specific users to avoid even trying to send requests, but I think it's
> good to have the single place that always ensures correct functionality
> of the drain instead of making it dependent on the user.
>
How to do that for the synchronous blk_write callers that don't run in
a coroutine?
Fam
- Re: [Qemu-block] [Qemu-devel] [PATCH v6 01/13] block: Add op blocker type "device IO", (continued)
- Re: [Qemu-block] [Qemu-devel] [PATCH v6 01/13] block: Add op blocker type "device IO", Fam Zheng, 2015/05/28
- Re: [Qemu-block] [Qemu-devel] [PATCH v6 01/13] block: Add op blocker type "device IO", Paolo Bonzini, 2015/05/28
- Re: [Qemu-block] [Qemu-devel] [PATCH v6 01/13] block: Add op blocker type "device IO", Fam Zheng, 2015/05/28
- Re: [Qemu-block] [Qemu-devel] [PATCH v6 01/13] block: Add op blocker type "device IO", Paolo Bonzini, 2015/05/28
- Re: [Qemu-block] [Qemu-devel] [PATCH v6 01/13] block: Add op blocker type "device IO", Fam Zheng, 2015/05/28
- Re: [Qemu-block] [Qemu-devel] [PATCH v6 01/13] block: Add op blocker type "device IO", Kevin Wolf, 2015/05/28
- Re: [Qemu-block] [Qemu-devel] [PATCH v6 01/13] block: Add op blocker type "device IO", Fam Zheng, 2015/05/28
- Re: [Qemu-block] [Qemu-devel] [PATCH v6 01/13] block: Add op blocker type "device IO", Paolo Bonzini, 2015/05/28
- Re: [Qemu-block] [Qemu-devel] [PATCH v6 01/13] block: Add op blocker type "device IO", Kevin Wolf, 2015/05/28
- Re: [Qemu-block] [Qemu-devel] [PATCH v6 01/13] block: Add op blocker type "device IO", Paolo Bonzini, 2015/05/28
- Re: [Qemu-block] [Qemu-devel] [PATCH v6 01/13] block: Add op blocker type "device IO",
Fam Zheng <=
- Re: [Qemu-block] [Qemu-devel] [PATCH v6 01/13] block: Add op blocker type "device IO", Paolo Bonzini, 2015/05/28
- Re: [Qemu-block] [Qemu-devel] [PATCH v6 01/13] block: Add op blocker type "device IO", Fam Zheng, 2015/05/28
[Qemu-block] [PATCH v6 02/13] block: Add op blocker notifier list, Fam Zheng, 2015/05/21
[Qemu-block] [PATCH v6 03/13] block-backend: Add blk_op_blocker_add_notifier, Fam Zheng, 2015/05/21
[Qemu-block] [PATCH v6 05/13] virtio-blk: Don't handle output when there is "device IO" op blocker, Fam Zheng, 2015/05/21
[Qemu-block] [PATCH v6 04/13] virtio-blk: Move complete_request to 'ops' structure, Fam Zheng, 2015/05/21
[Qemu-block] [PATCH v6 06/13] virtio-scsi-dataplane: Add "device IO" op blocker listener, Fam Zheng, 2015/05/21
[Qemu-block] [PATCH v6 07/13] nbd-server: Clear "can_read" when "device io" blocker is set, Fam Zheng, 2015/05/21