All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Peter Xu <peterx@redhat.com>
Cc: "Hyman Huang" <huangy81@chinatelecom.cn>,
	"manish.mishra" <manish.mishra@nutanix.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	"Eduardo Habkost" <eduardo@habkost.net>,
	"David Hildenbrand" <david@redhat.com>,
	"Juan Quintela" <quintela@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Markus ArmBruster" <armbru@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: Re: [PATCH v17 6/8] softmmu/dirtylimit: Implement virtual CPU throttle
Date: Thu, 26 May 2022 10:51:55 +0800	[thread overview]
Message-ID: <CACGkMEsiLUxEKD=o23aaHzo5AVy-vTRPKhxtT6-cTT+ETtdpaA@mail.gmail.com> (raw)
In-Reply-To: <Yo5RiqKWuwZPY6Iv@xz-m1.local>

On Wed, May 25, 2022 at 11:56 PM Peter Xu <peterx@redhat.com> wrote:
>
> On Wed, May 25, 2022 at 11:38:26PM +0800, Hyman Huang wrote:
> > > 2. Also this algorithm only control or limits dirty rate by guest
> > > writes. There can be some memory dirtying done by virtio based devices
> > > which is accounted only at qemu level so may not be accounted through
> > > dirty rings so do we have plan for that in future? Those are not issue
> > > for auto-converge as it slows full VM but dirty rate limit only slows
> > > guest writes.
> > >
> > From the migration point of view, time spent on migrating memory is far
> > greater than migrating devices emulated by qemu. I think we can do that when
> > migrating device costs the same magnitude time as migrating memory.
> >
> > As to auto-converge, it throttle vcpu by kicking it and force it to sleep
> > periodically. The two seems has no much difference from the perspective of
> > internal method but the auto-converge is kind of "offensive" when doing
> > restraint. I'll read the auto-converge implementation code and figure out
> > the problem you point out.
>
> This seems to be not virtio-specific, but can be applied to any device DMA
> writting to guest mem (if not including vfio).  But indeed virtio can be
> normally faster.
>
> I'm also curious how fast a device DMA could dirty memories.  This could be
> a question to answer to all vcpu-based throttling approaches (including the
> quota based approach that was proposed on KVM list).  Maybe for kernel
> virtio drivers we can have some easier estimation?

As you said below, it really depends on the speed of the backend.

>  My guess is it'll be
> much harder for DPDK-in-guest (aka userspace drivers) because IIUC that
> could use a large chunk of guest mem.

Probably, for vhost-user backend, it could be ~20Mpps or even higher.

Thanks

>
> [copy Jason too]
>
> --
> Peter Xu
>



  reply	other threads:[~2022-05-26  2:53 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-02 17:55 [PATCH v17 0/8] support dirty restraint on vCPU huangy81
     [not found] ` <cover.1646243447.git.huangy81@chinatelecom.cn>
2022-03-02 17:55   ` [PATCH v17 1/8] accel/kvm/kvm-all: Refactor per-vcpu dirty ring reaping huangy81
2022-03-02 17:55   ` [PATCH v17 2/8] cpus: Introduce cpu_list_generation_id huangy81
2022-03-02 17:55   ` [PATCH v17 3/8] migration/dirtyrate: Refactor dirty page rate calculation huangy81
2022-03-02 17:55   ` [PATCH v17 4/8] softmmu/dirtylimit: Implement vCPU dirtyrate calculation periodically huangy81
2022-03-02 17:55   ` [PATCH v17 5/8] accel/kvm/kvm-all: Introduce kvm_dirty_ring_size function huangy81
2022-03-02 17:55   ` [PATCH v17 6/8] softmmu/dirtylimit: Implement virtual CPU throttle huangy81
2022-05-16 17:13     ` manish.mishra
2022-05-17  8:19       ` Hyman Huang
2022-05-23 16:44         ` manish.mishra
2022-05-25 15:38           ` Hyman Huang
2022-05-25 15:55             ` Peter Xu
2022-05-26  2:51               ` Jason Wang [this message]
2022-06-01 16:15                 ` manish.mishra
2022-06-13  9:58                 ` manish.mishra
2022-06-13 14:33                   ` Peter Xu
2022-06-13 15:33                     ` manish.mishra
2022-06-13 15:58                       ` Peter Xu
2022-03-02 17:55   ` [PATCH v17 7/8] softmmu/dirtylimit: Implement dirty page rate limit huangy81
2022-03-02 17:55   ` [PATCH v17 8/8] tests/qtest/qmp-cmd-test: Ignore query-vcpu-dirty-limit test huangy81
2022-03-03  5:58     ` Markus Armbruster
2022-03-03  6:11       ` Hyman Huang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACGkMEsiLUxEKD=o23aaHzo5AVy-vTRPKhxtT6-cTT+ETtdpaA@mail.gmail.com' \
    --to=jasowang@redhat.com \
    --cc=armbru@redhat.com \
    --cc=david@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=huangy81@chinatelecom.cn \
    --cc=manish.mishra@nutanix.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.