All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: Hanna Czenczek <hreitz@redhat.com>,
	qemu-block@nongnu.org, qemu-devel@nongnu.org,
	John Snow <jsnow@redhat.com>, "Denis V . Lunev" <den@openvz.org>,
	Eric Blake <eblake@redhat.com>,
	Markus Armbruster <armbru@redhat.com>
Subject: Re: [PATCH 0/9] block: BLOCK_IO_DELAY event
Date: Tue, 22 Sep 2026 13:18:39 -0400	[thread overview]
Message-ID: <20260922171838.GA231912@fedora> (raw)
In-Reply-To: <arKDQRZ7q7k0JvG1@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1723 bytes --]

On Tue, Sep 22, 2026 at 03:31:49PM +0200, Kevin Wolf wrote:
> Am 21.09.2026 um 22:41 hat Stefan Hajnoczi geschrieben:
> > On Wed, Sep 16, 2026 at 10:04:51AM +0200, Hanna Czenczek wrote:
> > > On 03.09.26 16:08, Stefan Hajnoczi wrote:
> > > > On Mon, Aug 31, 2026 at 03:51:56PM +0200, Hanna Czenczek wrote:
> > > The problem is that if the destructor has to be called explicitly, we may
> > > forget to do so; and accounting is done on the device emulation level, so
> > > there is no central place where the pairing of constructor and destructor
> > > would be obvious and trivial to verify.
> > 
> > This is the part I'm asking about: can accounting be done by the block
> > layer? There might be cases that are purely handled in device emulation
> > code without a call into the block layer. In that case the accounting
> > still needs to be done in device emulation code. But when device
> > emulation calls blk_aio_*(), it should not do accounting itself.
> 
> Apart from cases where requests are completed entirely within the
> device (like for all block_acct_invalid() callers), there are also cases
> where a single device-level requests involves multiple backend-level
> requests. I was thinking of IDE TRIM initially, but actually I think
> splitting can happen for any request that uses the DMA helpers.
> 
> Conversely, virtio-blk can merge requests, so you get a single request
> in the backend that covers multiple requests in the device.

Sticking to the requests as seen by the device seems like the cleanest
solution rather than cheating and counting host requests in some places.

The idea to move the accounting into blk_aio_*() doesn't work well in
light of this.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2026-09-22 17:19 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-31 13:51 [PATCH 0/9] block: BLOCK_IO_DELAY event Hanna Czenczek
2026-08-31 13:51 ` [PATCH 1/9] block/accounting: Add offset to BlockAcctCookie Hanna Czenczek
2026-09-07 10:05   ` Jesper Wendel Devantier
2026-08-31 13:51 ` [PATCH 2/9] qapi/block: Add IoAccountingOperation enum Hanna Czenczek
2026-09-03 14:32   ` Markus Armbruster
2026-09-16  8:09     ` Hanna Czenczek
2026-08-31 13:51 ` [PATCH 3/9] qapi/block: Add BLOCK_IO_DELAY event Hanna Czenczek
2026-09-03 14:36   ` Markus Armbruster
2026-09-16  8:08     ` Hanna Czenczek
2026-09-16  9:57       ` Markus Armbruster
2026-08-31 13:52 ` [PATCH 4/9] block-backend: Public blk_get_attached_dev_path() Hanna Czenczek
2026-08-31 13:52 ` [PATCH 5/9] block/accounting: Add BB field to latency checker Hanna Czenczek
2026-09-22 12:14   ` Kevin Wolf
2026-09-23 11:05     ` Hanna Czenczek
2026-08-31 13:52 ` [PATCH 6/9] block/accounting: Emit BLOCK_IO_DELAY event Hanna Czenczek
2026-09-03 14:23   ` Stefan Hajnoczi
2026-09-16  8:14     ` Hanna Czenczek
2026-09-16 12:04       ` Hanna Czenczek
2026-09-21 20:48         ` Stefan Hajnoczi
2026-09-23 10:45           ` Hanna Czenczek
2026-09-22 12:44   ` Kevin Wolf
2026-09-23 11:11     ` Hanna Czenczek
2026-08-31 13:52 ` [PATCH 7/9] block: Add delay-alert-ms property Hanna Czenczek
2026-09-03 14:30   ` Stefan Hajnoczi
2026-09-16  8:17     ` Hanna Czenczek
2026-09-22 12:51       ` Kevin Wolf
2026-08-31 13:52 ` [PATCH 8/9] block/accounting: Move latency_ns override down Hanna Czenczek
2026-09-03 15:08   ` Stefan Hajnoczi
2026-09-16  8:21     ` Hanna Czenczek
2026-09-21 20:42       ` Stefan Hajnoczi
2026-09-22 13:03         ` Kevin Wolf
2026-09-22 13:44           ` Alberto Garcia
2026-09-22 13:52             ` Kevin Wolf
2026-09-23 10:50               ` Hanna Czenczek
2026-08-31 13:52 ` [PATCH 9/9] iotests: Add delay-alert test Hanna Czenczek
2026-09-03 15:16   ` Stefan Hajnoczi
2026-09-03 14:08 ` [PATCH 0/9] block: BLOCK_IO_DELAY event Stefan Hajnoczi
2026-09-16  8:04   ` Hanna Czenczek
2026-09-21 20:41     ` Stefan Hajnoczi
2026-09-22 13:31       ` Kevin Wolf
2026-09-22 17:18         ` Stefan Hajnoczi [this message]
2026-09-23 10:52           ` Hanna Czenczek
2026-09-24 14:51             ` Stefan Hajnoczi
2026-09-23 10:48       ` Hanna Czenczek
2026-09-23 14:50         ` Kevin Wolf
2026-09-24 15:17         ` Stefan Hajnoczi
2026-09-24 18:31           ` Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260922171838.GA231912@fedora \
    --to=stefanha@redhat.com \
    --cc=armbru@redhat.com \
    --cc=den@openvz.org \
    --cc=eblake@redhat.com \
    --cc=hreitz@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.