qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Qemu-IO : Indentify Guest File access Types


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] Qemu-IO : Indentify Guest File access Types
Date: Mon, 15 Jul 2013 10:40:46 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

On Sat, Jul 06, 2013 at 04:52:57PM +0800, Saptarshi Sen wrote:
>    Is it possible from qemu userspace to identify what type of file access
> ( DIRECT or SYNC or ASYNC )the guest is performing on its files also along
> with their file-names if possible.
> 
>    I tried to trace bdrv events but I am not able to correctly identify.

No.  QEMU does not have this information because it simply emulates
block devices (disks).  So it just sees "write this buffer to offset
0x12340000" or "read into this buffer from offset 0x12340000".

If guest applications do not use O_DIRECT, then I/O will go through the
guest page cache.  When a read is cached QEMU sees no disk activity at
all since the data is already in guest memory.

O_SYNC usually means a flush request is sent to the disk.  This is
visible at the virtio-blk/IDE/SCSI level that QEMU emulates.

Filenames are not visible since the file system metadata is completely
dependent on the guest operating system and QEMU emulates block devices,
not file systems.

Consider capturing this information inside the guest or using a network
file system, which would allow you to at least see filenames.  Keep in
mind that the guest page cache can service read requests with no network
file system activity.

Stefan



reply via email to

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