qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 0/3] better I/O accounting


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 0/3] better I/O accounting
Date: Fri, 12 Aug 2011 06:50:57 +0100

On Fri, Aug 12, 2011 at 6:14 AM, Stefan Hajnoczi <address@hidden> wrote:
> This change requires that callers manage the accounting cookie.  I
> think this belongs in block.c to make the life of callers easier.
>
> Today block.c doesn't track requests and pretty much lets the
> BlockDriver control the BlockDriverAIOCB.  But the request metadata
> (timestamp, operation type, number of bytes) could all be part of the
> BlockDriverAIOCB.  block.c also needs to interpose a cb function so
> that it can account when the request completes.  Doing this all once
> seems like the right way to go.

I do see the drawbacks of leaving accounting in block.c on every
request.  For example, we'll fetch the timestamp for internal requests
as well as external requests from hardware emulation.  Due to memory
mapping and bounce buffers it is also possible that requests get
split.  Multiwrite also changes the I/O pattern.

So I guess this external accounting cookie approach is okay.  We just
need to be strict about reviewing any code that uses bdrv_aio_*() to
make sure it has accounting in place where appropriate.

Stefan



reply via email to

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