virtio-dev.lists.oasis-open.org archive mirror
 help / color / mirror / Atom feed
From: "T.J. Alumbaugh" <talumbau@google.com>
To: virtio-dev@lists.oasis-open.org, virtio-comment@lists.oasis-open.org
Subject: [virtio-dev] [RFC PATCH 0/1] virtio-balloon: Add Working Set Reporting feature
Date: Mon, 15 May 2023 14:33:29 -0600	[thread overview]
Message-ID: <CABmGT5Hv6Jd_F9EoQqVMDo4w5=7wJYmS4wwYDqXK3wov44Tf=w@mail.gmail.com> (raw)

This is a proposed spec expansion for a Working Set Reporting feature
in the balloon with driver patch here:

https://lore.kernel.org/linux-mm/20230509185419.1088297-1-yuanchu@google.com/

with device implementation here:

https://lists.gnu.org/archive/html/qemu-devel/2023-05/msg02503.html

It describes the requirements for a VIRTIO_F_WS_REPORTING feature bit
on the balloon device.

Motivation
==========
When we have a system with overcommitted memory and 1 or more VMs, we
seek to get both timely and accurate information on overall memory
utilization in order to drive appropriate reclaim activities. For
example, in some client device use cases a VM might need a significant
fraction of the overall memory for a period of time, but then enter a
quiet period that results in a large number of cold pages in the guest.

The balloon device has a number of features to assist in sharing memory
resources amongst the guests and host (e.g free page hinting, stats, free page
reporting). As mentioned in slide 12 in [1], the balloon doesn't have a good
mechanism to drive the reclaim of guest cache. Our use case includes both
typical page cache as well as "application caches" with memory that should be
discarded in times of system-wide memory pressure.

Working Set Reporting
=====================

Working Set reporting in the balloon provides:

 - an accurate picture of current memory utilization in the guest
 - event driven reporting (with configurable rate limiting) to deliver reports
   during times of memory pressure.

The reporting mechanism can be combined with a domain-specific balloon policy
to drive the separate reclaim activities in a coordinated fashion.

TODOs:
======

 - There are some small differences between this spec and the
   implementation in the data exchange protocol in the device. We wanted to
   get feedback on this diff at an early stage though, rather than get every
   piece nailed down with precision.

References:

[1] https://kvmforum2020.sched.com/event/eE4U/virtio-balloonpmemmem-managing-guest-memory-david-hildenbrand-michael-s-tsirkin-red-hat

T.J. Alumbaugh (1):
  virtio-balloon: Add Working Set Reporting feature

 device-types/balloon/description.tex | 228 ++++++++++++++++++++++++++-
 1 file changed, 227 insertions(+), 1 deletion(-)

-- 
2.40.1.606.ga4b1b128d6-goog

---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


             reply	other threads:[~2023-05-15 20:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-15 20:33 T.J. Alumbaugh [this message]
2023-05-15 20:34 ` [virtio-dev] [RFC PATCH 1/1] virtio-balloon: Add Working Set Reporting feature T.J. Alumbaugh

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='CABmGT5Hv6Jd_F9EoQqVMDo4w5=7wJYmS4wwYDqXK3wov44Tf=w@mail.gmail.com' \
    --to=talumbau@google.com \
    --cc=virtio-comment@lists.oasis-open.org \
    --cc=virtio-dev@lists.oasis-open.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).