Re: [Qemu-devel] [PATCH v1 2/2] virtio-scsi: dataplane: notify guest as batch

2014-11-11 Thread Ming Lei
On Wed, Nov 12, 2014 at 1:28 AM, Stefan Hajnoczi wrote: > On Tue, Nov 11, 2014 at 09:17:10AM +0800, Ming Lei wrote: >> +static void notify_guest_bh(void *opaque) >> +{ >> +VirtIOSCSI *s = opaque; >> +unsigned int qid; >> +uint64_t pending = s->pending_guest_notify; >> + >> +s->pend

Re: [Qemu-devel] [PATCH v1 2/2] virtio-scsi: dataplane: notify guest as batch

2014-11-11 Thread Stefan Hajnoczi
On Tue, Nov 11, 2014 at 09:17:10AM +0800, Ming Lei wrote: > +static void notify_guest_bh(void *opaque) > +{ > +VirtIOSCSI *s = opaque; > +unsigned int qid; > +uint64_t pending = s->pending_guest_notify; > + > +s->pending_guest_notify = 0; > + > +while ((qid = ffsl(pending))) { >

Re: [Qemu-devel] [PATCH v1 2/2] virtio-scsi: dataplane: notify guest as batch

2014-11-10 Thread Ming Lei
On Tue, Nov 11, 2014 at 10:52 AM, Fam Zheng wrote: > On Tue, 11/11 10:29, Ming Lei wrote: >> On Tue, Nov 11, 2014 at 9:52 AM, Fam Zheng wrote: >> > On Tue, 11/11 09:17, Ming Lei wrote: >> >> It isn't necessery to notify guest each time when one request >> >> is completed, and it should be enough

Re: [Qemu-devel] [PATCH v1 2/2] virtio-scsi: dataplane: notify guest as batch

2014-11-10 Thread Fam Zheng
On Tue, 11/11 10:29, Ming Lei wrote: > On Tue, Nov 11, 2014 at 9:52 AM, Fam Zheng wrote: > > On Tue, 11/11 09:17, Ming Lei wrote: > >> It isn't necessery to notify guest each time when one request > >> is completed, and it should be enough to just notify one time > >> for each running of virtio_sc

Re: [Qemu-devel] [PATCH v1 2/2] virtio-scsi: dataplane: notify guest as batch

2014-11-10 Thread Ming Lei
On Tue, Nov 11, 2014 at 9:52 AM, Fam Zheng wrote: > On Tue, 11/11 09:17, Ming Lei wrote: >> It isn't necessery to notify guest each time when one request >> is completed, and it should be enough to just notify one time >> for each running of virtio_scsi_iothread_handle_cmd(). >> >> This patch supr

Re: [Qemu-devel] [PATCH v1 2/2] virtio-scsi: dataplane: notify guest as batch

2014-11-10 Thread Fam Zheng
On Tue, 11/11 09:17, Ming Lei wrote: > It isn't necessery to notify guest each time when one request > is completed, and it should be enough to just notify one time > for each running of virtio_scsi_iothread_handle_cmd(). > > This patch supresses about 30K/sec write on eventfd. > > Signed-off-by:

[Qemu-devel] [PATCH v1 2/2] virtio-scsi: dataplane: notify guest as batch

2014-11-10 Thread Ming Lei
It isn't necessery to notify guest each time when one request is completed, and it should be enough to just notify one time for each running of virtio_scsi_iothread_handle_cmd(). This patch supresses about 30K/sec write on eventfd. Signed-off-by: Ming Lei --- hw/scsi/virtio-scsi-dataplane.c |