Re: [RFC] vhost-blk implementation

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

 



On 03/23/2010 04:55 PM, Badari Pulavarty wrote:
This should be done asynchronously. That is likely the cause of write performance degradation. For reads, readahead means that that you're async anyway, but writes/syncs are still synchronous.

I am not sure what you mean by async here. Even if I use f_op->aio_write() its still synchronous (except for DIO). Since we are writing to pagecache and not waiting for write()
to complete, this is the best we can do here.

It fails with O_DIRECT or O_DSYNC, or if the write cache is full and we need to wait on writeout. Reads that don't hit pagecache will also be synchronous. You could use threads (like qemu) or use the block layer (which is async).


Do you mean offload write() handling to another thread ?

Yeah.  Read too.


I also think it should be done at the bio layer.
I am not sure what you meant here. Do you want to do submit_bio() directly ? Its not going to be that simple. Since the sector# is offset within the file, one have to do getblocks() on it to find the real-disk-block#s + we have to do get_user_pages() on these iovecs before submitting them to bio.. All of this work is done by vfs_write()/vfs_read() anyway.. I am not
sure what you are suggesting here..

For the case where the file is actually a partition, use submit_bio(). When the file is a file, keep it in qemu, that path is going to be slower anyway.


--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux