Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-07-05 Thread Asias He
On 07/04/2012 10:40 AM, Rusty Russell wrote: On Tue, 03 Jul 2012 08:39:39 +0800, Asias He wrote: On 07/02/2012 02:41 PM, Rusty Russell wrote: Sure, our guest merging might save us 100x as many exits as no merging. But since we're not doing many requests, does it matter? We can still have man

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-07-04 Thread Paolo Bonzini
Il 03/07/2012 16:28, Dor Laor ha scritto: Users using a spinning disk still get IO scheduling in the host though. What benefit is there in doing it in the guest as well? >>> >>> The io scheduler waits for requests to merge and thus batch IOs >>> together. It's not important w.r.t spinning

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-07-03 Thread Rusty Russell
On Tue, 03 Jul 2012 08:39:39 +0800, Asias He wrote: > On 07/02/2012 02:41 PM, Rusty Russell wrote: > > Sure, our guest merging might save us 100x as many exits as no merging. > > But since we're not doing many requests, does it matter? > > We can still have many requests with slow devices. The nu

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-07-03 Thread Dor Laor
On 07/03/2012 05:22 PM, Ronen Hod wrote: On 06/18/2012 02:14 PM, Dor Laor wrote: On 06/18/2012 01:05 PM, Rusty Russell wrote: On Mon, 18 Jun 2012 16:03:23 +0800, Asias He wrote: On 06/18/2012 03:46 PM, Rusty Russell wrote: On Mon, 18 Jun 2012 14:53:10 +0800, Asias He wrote: This patch intr

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-07-03 Thread Ronen Hod
On 06/18/2012 02:14 PM, Dor Laor wrote: On 06/18/2012 01:05 PM, Rusty Russell wrote: On Mon, 18 Jun 2012 16:03:23 +0800, Asias He wrote: On 06/18/2012 03:46 PM, Rusty Russell wrote: On Mon, 18 Jun 2012 14:53:10 +0800, Asias He wrote: This patch introduces bio-based IO path for virtio-blk.

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-07-03 Thread Asias He
On 07/03/2012 09:31 PM, Paolo Bonzini wrote: Il 02/07/2012 08:41, Rusty Russell ha scritto: With the same workload in guest, the guest fires 200K requests to host with merges enabled in guest (echo 0 > /sys/block/vdb/queue/nomerges), while the guest fires 4K requests to host with merges disa

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-07-03 Thread Paolo Bonzini
Il 02/07/2012 08:41, Rusty Russell ha scritto: >> With the same workload in guest, the guest fires 200K requests to host >> with merges enabled in guest (echo 0 > /sys/block/vdb/queue/nomerges), >> while the guest fires 4K requests to host with merges disabled in >> guest (echo 2 > /sys/bloc

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-07-02 Thread Asias He
On 07/02/2012 02:41 PM, Rusty Russell wrote: On Mon, 02 Jul 2012 10:45:05 +0800, Asias He wrote: On 07/02/2012 07:54 AM, Rusty Russell wrote: Confused. So, without merging we get 6k exits (per second?) How many do we get when we use the request-based IO path? Sorry for the confusion. The n

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-07-02 Thread Rusty Russell
On Mon, 02 Jul 2012 10:45:05 +0800, Asias He wrote: > On 07/02/2012 07:54 AM, Rusty Russell wrote: > > Confused. So, without merging we get 6k exits (per second?) How many > > do we get when we use the request-based IO path? > > Sorry for the confusion. The numbers were collected from request-b

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-07-01 Thread Asias He
On 07/02/2012 07:54 AM, Rusty Russell wrote: On Tue, 19 Jun 2012 10:51:18 +0800, Asias He wrote: On 06/18/2012 07:39 PM, Sasha Levin wrote: On Mon, 2012-06-18 at 14:14 +0300, Dor Laor wrote: On 06/18/2012 01:05 PM, Rusty Russell wrote: On Mon, 18 Jun 2012 16:03:23 +0800, Asias He wrote: On

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-07-01 Thread Rusty Russell
On Tue, 19 Jun 2012 10:51:18 +0800, Asias He wrote: > On 06/18/2012 07:39 PM, Sasha Levin wrote: > > On Mon, 2012-06-18 at 14:14 +0300, Dor Laor wrote: > >> On 06/18/2012 01:05 PM, Rusty Russell wrote: > >>> On Mon, 18 Jun 2012 16:03:23 +0800, Asias He wrote: > On 06/18/2012 03:46 PM, Rusty

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-06-21 Thread Dor Laor
On 06/20/2012 07:46 AM, Asias He wrote: On 06/19/2012 02:21 PM, Dor Laor wrote: On 06/19/2012 05:51 AM, Asias He wrote: On 06/18/2012 07:39 PM, Sasha Levin wrote: On Mon, 2012-06-18 at 14:14 +0300, Dor Laor wrote: On 06/18/2012 01:05 PM, Rusty Russell wrote: On Mon, 18 Jun 2012 16:03:23 +080

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-06-19 Thread Asias He
On 06/19/2012 02:21 PM, Dor Laor wrote: On 06/19/2012 05:51 AM, Asias He wrote: On 06/18/2012 07:39 PM, Sasha Levin wrote: On Mon, 2012-06-18 at 14:14 +0300, Dor Laor wrote: On 06/18/2012 01:05 PM, Rusty Russell wrote: On Mon, 18 Jun 2012 16:03:23 +0800, Asias He wrote: On 06/18/2012 03:46 P

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-06-18 Thread Dor Laor
On 06/19/2012 05:51 AM, Asias He wrote: On 06/18/2012 07:39 PM, Sasha Levin wrote: On Mon, 2012-06-18 at 14:14 +0300, Dor Laor wrote: On 06/18/2012 01:05 PM, Rusty Russell wrote: On Mon, 18 Jun 2012 16:03:23 +0800, Asias He wrote: On 06/18/2012 03:46 PM, Rusty Russell wrote: On Mon, 18 Jun 2

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-06-18 Thread Asias He
On 06/18/2012 07:39 PM, Sasha Levin wrote: On Mon, 2012-06-18 at 14:14 +0300, Dor Laor wrote: On 06/18/2012 01:05 PM, Rusty Russell wrote: On Mon, 18 Jun 2012 16:03:23 +0800, Asias He wrote: On 06/18/2012 03:46 PM, Rusty Russell wrote: On Mon, 18 Jun 2012 14:53:10 +0800, Asias He wrote: Th

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-06-18 Thread Asias He
On 06/18/2012 06:05 PM, Rusty Russell wrote: On Mon, 18 Jun 2012 16:03:23 +0800, Asias He wrote: On 06/18/2012 03:46 PM, Rusty Russell wrote: On Mon, 18 Jun 2012 14:53:10 +0800, Asias He wrote: This patch introduces bio-based IO path for virtio-blk. Why make it optional? request-based IO

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-06-18 Thread Asias He
On 06/18/2012 06:21 PM, Michael S. Tsirkin wrote: On Mon, Jun 18, 2012 at 02:53:10PM +0800, Asias He wrote: +static void virtblk_make_request(struct request_queue *q, struct bio *bio) +{ + struct virtio_blk *vblk = q->queuedata; + unsigned int num, out = 0, in = 0; + struct vir

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-06-18 Thread Asias He
On 06/18/2012 06:13 PM, Michael S. Tsirkin wrote: On Mon, Jun 18, 2012 at 04:03:23PM +0800, Asias He wrote: On 06/18/2012 03:46 PM, Rusty Russell wrote: On Mon, 18 Jun 2012 14:53:10 +0800, Asias He wrote: This patch introduces bio-based IO path for virtio-blk. Why make it optional? reques

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-06-18 Thread Tejun Heo
Hello, guys. On Mon, Jun 18, 2012 at 07:35:22PM +0930, Rusty Russell wrote: > On Mon, 18 Jun 2012 16:03:23 +0800, Asias He wrote: > > On 06/18/2012 03:46 PM, Rusty Russell wrote: > > > On Mon, 18 Jun 2012 14:53:10 +0800, Asias He wrote: > > >> This patch introduces bio-based IO path for virtio-b

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-06-18 Thread Sasha Levin
On Mon, 2012-06-18 at 14:14 +0300, Dor Laor wrote: > On 06/18/2012 01:05 PM, Rusty Russell wrote: > > On Mon, 18 Jun 2012 16:03:23 +0800, Asias He wrote: > >> On 06/18/2012 03:46 PM, Rusty Russell wrote: > >>> On Mon, 18 Jun 2012 14:53:10 +0800, Asias He wrote: > This patch introduces bio-ba

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-06-18 Thread Dor Laor
On 06/18/2012 01:05 PM, Rusty Russell wrote: On Mon, 18 Jun 2012 16:03:23 +0800, Asias He wrote: On 06/18/2012 03:46 PM, Rusty Russell wrote: On Mon, 18 Jun 2012 14:53:10 +0800, Asias He wrote: This patch introduces bio-based IO path for virtio-blk. Why make it optional? request-based IO

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-06-18 Thread Stefan Hajnoczi
On Mon, Jun 18, 2012 at 11:21 AM, Michael S. Tsirkin wrote: > On Mon, Jun 18, 2012 at 02:53:10PM +0800, Asias He wrote: >> +static void virtblk_make_request(struct request_queue *q, struct bio *bio) >> +{ >> +     struct virtio_blk *vblk = q->queuedata; >> +     unsigned int num, out = 0, in = 0;

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-06-18 Thread Michael S. Tsirkin
On Mon, Jun 18, 2012 at 02:53:10PM +0800, Asias He wrote: > +static void virtblk_make_request(struct request_queue *q, struct bio *bio) > +{ > + struct virtio_blk *vblk = q->queuedata; > + unsigned int num, out = 0, in = 0; > + struct virtblk_req *vbr; > + > + BUG_ON(bio->bi_phys_se

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-06-18 Thread Rusty Russell
On Mon, 18 Jun 2012 16:03:23 +0800, Asias He wrote: > On 06/18/2012 03:46 PM, Rusty Russell wrote: > > On Mon, 18 Jun 2012 14:53:10 +0800, Asias He wrote: > >> This patch introduces bio-based IO path for virtio-blk. > > > > Why make it optional? > > request-based IO path is useful for users who

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-06-18 Thread Michael S. Tsirkin
On Mon, Jun 18, 2012 at 04:03:23PM +0800, Asias He wrote: > On 06/18/2012 03:46 PM, Rusty Russell wrote: > >On Mon, 18 Jun 2012 14:53:10 +0800, Asias He wrote: > >>This patch introduces bio-based IO path for virtio-blk. > > > >Why make it optional? > > request-based IO path is useful for users wh

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-06-18 Thread Stefan Hajnoczi
On Mon, Jun 18, 2012 at 7:53 AM, Asias He wrote: > +static void virtblk_add_buf_wait(struct virtio_blk *vblk, > +                                struct virtblk_req *vbr, > +                                unsigned long out, > +                                unsigned long in) > +{ > +       DEFINE

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-06-18 Thread Asias He
On 06/18/2012 03:46 PM, Rusty Russell wrote: On Mon, 18 Jun 2012 14:53:10 +0800, Asias He wrote: This patch introduces bio-based IO path for virtio-blk. Why make it optional? request-based IO path is useful for users who do not want to bypass the IO scheduler in guest kernel, e.g. users us

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-06-18 Thread Rusty Russell
On Mon, 18 Jun 2012 14:53:10 +0800, Asias He wrote: > This patch introduces bio-based IO path for virtio-blk. Why make it optional? Thanks, Rusty. ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.o

[PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-06-17 Thread Asias He
This patch introduces bio-based IO path for virtio-blk. Compared to request-based IO path, bio-based IO path uses driver provided ->make_request_fn() method to bypasses the IO scheduler. It handles the bio to device directly without allocating a request in block layer. This reduces the IO path in