Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1716850

Re: [PATCH v14 3/5] virtio-balloon: VIRTIO_BALLOON_F_SG

From "Michael S. Tsirkin" <mst@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v14 3/5] virtio-balloon: VIRTIO_BALLOON_F_SG
Date 2017-08-21 22:30 +0200
Message-ID <uh1uH-Ac-49@gated-at.bofh.it> (permalink)
References <ufjP3-7vK-7@gated-at.bofh.it> <ufjP4-7vK-15@gated-at.bofh.it> <ufFcR-5kP-1@gated-at.bofh.it> <ufK2R-bj-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Aug 18, 2017 at 03:39:27PM +0800, Wei Wang wrote:
> On 08/18/2017 10:22 AM, Michael S. Tsirkin wrote:
> > +static void send_balloon_page_sg(struct virtio_balloon *vb,
> > +				 struct virtqueue *vq,
> > +				 void *addr,
> > +				 uint32_t size)
> > +{
> > +	unsigned int len;
> > +	int ret;
> > +
> > +	do {
> > +		ret = add_one_sg(vq, addr, size);
> > +		virtqueue_kick(vq);
> > +		wait_event(vb->acked, virtqueue_get_buf(vq, &len));
> > +		/*
> > +		 * It is uncommon to see the vq is full, because the sg is sent
> > +		 * one by one and the device is able to handle it in time. But
> > +		 * if that happens, we go back to retry after an entry gets
> > +		 * released.
> > +		 */
> > Why send one by one though? Why not batch some s/gs and wait for all
> > of them to be completed? If memory if fragmented, waiting every time is
> > worse than what we have now (VIRTIO_BALLOON_ARRAY_PFNS_MAX at a time).
> > 
> 
> OK, I'll do batching in some fashion.
> 
> 
> Best,
> Wei
> 
> 

btw you need to address the build errors that kbot has found.

-- 
MST

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v14 0/5] Virtio-balloon Enhancement Wei Wang <wei.w.wang@intel.com> - 2017-08-17 05:40 +0200
  [PATCH v14 1/5] lib/xbitmap: Introduce xbitmap Wei Wang <wei.w.wang@intel.com> - 2017-08-17 05:40 +0200
    Re: [PATCH v14 1/5] lib/xbitmap: Introduce xbitmap kbuild test robot <lkp@intel.com> - 2017-08-19 22:40 +0200
  [PATCH v14 3/5] virtio-balloon: VIRTIO_BALLOON_F_SG Wei Wang <wei.w.wang@intel.com> - 2017-08-17 05:40 +0200
    Re: [PATCH v14 3/5] virtio-balloon: VIRTIO_BALLOON_F_SG "Michael S. Tsirkin" <mst@redhat.com> - 2017-08-18 04:30 +0200
      Re: [PATCH v14 3/5] virtio-balloon: VIRTIO_BALLOON_F_SG Wei Wang <wei.w.wang@intel.com> - 2017-08-18 09:40 +0200
        Re: [PATCH v14 3/5] virtio-balloon: VIRTIO_BALLOON_F_SG "Michael S. Tsirkin" <mst@redhat.com> - 2017-08-21 22:30 +0200
  [PATCH v14 2/5] lib/xbitmap: add xb_find_next_bit() and xb_zero() Wei Wang <wei.w.wang@intel.com> - 2017-08-17 05:40 +0200
  [PATCH v14 5/5] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ Wei Wang <wei.w.wang@intel.com> - 2017-08-17 05:40 +0200
    Re: [PATCH v14 5/5] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ "Michael S. Tsirkin" <mst@redhat.com> - 2017-08-18 04:20 +0200
      Re: [PATCH v14 5/5] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ Wei Wang <wei.w.wang@intel.com> - 2017-08-18 10:40 +0200
        Re: [PATCH v14 5/5] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ "Michael S. Tsirkin" <mst@redhat.com> - 2017-08-18 20:30 +0200
          Re: [PATCH v14 5/5] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ Wei Wang <wei.w.wang@intel.com> - 2017-08-21 07:20 +0200
    Re: [PATCH v14 5/5] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ "Michael S. Tsirkin" <mst@redhat.com> - 2017-08-18 04:30 +0200
      Re: [PATCH v14 5/5] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ Wei Wang <wei.w.wang@intel.com> - 2017-08-18 10:40 +0200
        Re: [PATCH v14 5/5] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ "Michael S. Tsirkin" <mst@redhat.com> - 2017-08-18 20:20 +0200
          Re: [virtio-dev] Re: [PATCH v14 5/5] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ Wei Wang <wei.w.wang@intel.com> - 2017-08-21 07:30 +0200

csiph-web