linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: zhenwei pi <pizhenwei@bytedance.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	virtualization@lists.linux.dev
Cc: mst@redhat.com, jasowang@redhat.com, xuanzhuo@linux.alibaba.com,
	akpm@linux-foundation.org
Subject: Re: [RFC 0/3] Improve memory statistics for virtio balloon
Date: Mon, 15 Apr 2024 17:01:49 +0200	[thread overview]
Message-ID: <ee1ac0fb-daf7-4aea-b07e-f8879b6b860b@redhat.com> (raw)
In-Reply-To: <20240415084113.1203428-1-pizhenwei@bytedance.com>

On 15.04.24 10:41, zhenwei pi wrote:
> Hi,
> 
> When the guest runs under critial memory pressure, the guest becomss
> too slow, even sshd turns D state(uninterruptible) on memory
> allocation. We can't login this VM to do any work on trouble shooting.
> 
> Guest kernel log via virtual TTY(on host side) only provides a few
> necessary log after OOM. More detail memory statistics are required,
> then we can know explicit memory events and estimate the pressure.
> 
> I'm going to introduce several VM counters for virtio balloon:
> - oom-kill
> - alloc-stall
> - scan-async
> - scan-direct
> - reclaim-async
> - reclaim-direct

IIUC, we're only exposing events that are already getting provided via 
all_vm_events(), correct?

In that case, I don't really see a major issue. Some considerations:

(1) These new events are fairly Linux specific.

PSWPIN and friends are fairly generic, but HGTLB is also already fairly 
Linux specific already. OOM-kills don't really exist on Windows, for 
example. We'll have to be careful of properly describing what the 
semantics are.

(2) How should we handle if Linux ever stops supporting a certain event 
(e.g., major reclaim rework). I assume, simply return nothing like we 
currently would for VIRTIO_BALLOON_S_HTLB_PGALLOC without 
CONFIG_HUGETLB_PAGE.

-- 
Cheers,

David / dhildenb



  parent reply	other threads:[~2024-04-15 15:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-15  8:41 zhenwei pi
2024-04-15  8:41 ` [RFC 1/3] virtio_balloon: introduce oom-kill invocations zhenwei pi
2024-04-15 15:04   ` David Hildenbrand
2024-04-15  8:41 ` [RFC 2/3] virtio_balloon: introduce memory allocation stall counter zhenwei pi
2024-04-15 15:04   ` David Hildenbrand
2024-04-15  8:41 ` [RFC 3/3] virtio_balloon: introduce memory scan/reclaim info zhenwei pi
2024-04-15 15:06   ` David Hildenbrand
2024-04-15 15:01 ` David Hildenbrand [this message]
2024-04-16  3:20   ` Re: [RFC 0/3] Improve memory statistics for virtio balloon zhenwei pi

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=ee1ac0fb-daf7-4aea-b07e-f8879b6b860b@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=jasowang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mst@redhat.com \
    --cc=pizhenwei@bytedance.com \
    --cc=virtualization@lists.linux.dev \
    --cc=xuanzhuo@linux.alibaba.com \
    /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