From: Nico Pache <npache@redhat.com>
To: David Hildenbrand <david@redhat.com>
Cc: linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org,
virtualization@lists.linux.dev, xen-devel@lists.xenproject.org,
linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
cgroups@vger.kernel.org, kys@microsoft.com,
haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com,
jerrin.shaji-george@broadcom.com,
bcm-kernel-feedback-list@broadcom.com, arnd@arndb.de,
gregkh@linuxfoundation.org, mst@redhat.com, jasowang@redhat.com,
xuanzhuo@linux.alibaba.com, eperezma@redhat.com,
jgross@suse.com, sstabellini@kernel.org,
oleksandr_tyshchenko@epam.com, akpm@linux-foundation.org,
hannes@cmpxchg.org, mhocko@kernel.org, roman.gushchin@linux.dev,
shakeel.butt@linux.dev, muchun.song@linux.dev,
nphamcs@gmail.com, yosry.ahmed@linux.dev,
kanchana.p.sridhar@intel.com, alexander.atanasov@virtuozzo.com
Subject: Re: [RFC 1/5] meminfo: add a per node counter for balloon drivers
Date: Thu, 13 Mar 2025 11:35:49 -0600 [thread overview]
Message-ID: <CAA1CXcBsnbj1toxZNbks+NxrR_R_xuUb76X4ANin551Fi0WROA@mail.gmail.com> (raw)
In-Reply-To: <e9570319-a766-40f6-a8ea-8d9af5f03f81@redhat.com>
On Thu, Mar 13, 2025 at 2:22 AM David Hildenbrand <david@redhat.com> wrote:
>
> On 13.03.25 00:04, Nico Pache wrote:
> > On Wed, Mar 12, 2025 at 4:19 PM David Hildenbrand <david@redhat.com> wrote:
> >>
> >> On 12.03.25 01:06, Nico Pache wrote:
> >>> Add NR_BALLOON_PAGES counter to track memory used by balloon drivers and
> >>> expose it through /proc/meminfo and other memory reporting interfaces.
> >>
> >> In balloon_page_enqueue_one(), we perform a
> >>
> >> __count_vm_event(BALLOON_INFLATE)
> >>
> >> and in balloon_page_list_dequeue
> >>
> >> __count_vm_event(BALLOON_DEFLATE);
> >>
> >>
> >> Should we maybe simply do the per-node accounting similarly there?
> >
> > I think the issue is that some balloon drivers use the
> > balloon_compaction interface while others use their own.
> >
> > This would require unifying all the drivers under a single api which
> > may be tricky if they all have different behavior
>
> Why would that be required? Simply implement it in the balloon
> compaction logic, and in addition separately in the ones that don't
> implement it.
Ah ok that makes sense!
>
> That's the same as how we handle PageOffline today.
>
> In summary, we have
>
> virtio-balloon: balloon compaction
> hv-balloon: no balloon compaction
> xen-balloon: no balloon compaction
> vmx-balloon: balloon compaction
> pseries-cmm: balloon compaction
I'm having a hard time verifying this... it looks like only
vmx-balloon uses the balloon_compaction balloon_page_list_enqueue
function that calls balloon_page_enqueue_one.
>
> So you'd handle 3 balloon drivers in one go.
>
> (this series didn't touch pseries-cmm)
Ah I didn't realize that was a balloon driver. Ill add that one to the todo.
>
> --
> Cheers,
>
> David / dhildenb
>
next prev parent reply other threads:[~2025-03-13 17:36 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-12 0:06 [RFC 0/5] track memory used by " Nico Pache
2025-03-12 0:06 ` [RFC 1/5] meminfo: add a per node counter for " Nico Pache
2025-03-12 4:20 ` Shakeel Butt
2025-03-12 20:14 ` Nico Pache
2025-03-12 22:19 ` David Hildenbrand
2025-03-12 23:04 ` Nico Pache
2025-03-13 8:22 ` David Hildenbrand
2025-03-13 17:35 ` Nico Pache [this message]
2025-03-13 22:33 ` David Hildenbrand
2025-03-13 7:20 ` Michael S. Tsirkin
2025-03-13 8:17 ` David Hildenbrand
2025-03-12 0:06 ` [RFC 2/5] virtio_balloon: update the NR_BALLOON_PAGES state Nico Pache
2025-03-12 6:55 ` Michael S. Tsirkin
2025-03-12 0:06 ` [RFC 3/5] hv_balloon: " Nico Pache
2025-03-12 0:06 ` [RFC 4/5] vmx_balloon: " Nico Pache
2025-03-12 6:56 ` Michael S. Tsirkin
2025-03-12 20:11 ` Nico Pache
2025-03-12 20:57 ` Michael S. Tsirkin
2025-03-12 22:17 ` David Hildenbrand
2025-03-12 0:07 ` [RFC 5/5] xen: balloon: " Nico Pache
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=CAA1CXcBsnbj1toxZNbks+NxrR_R_xuUb76X4ANin551Fi0WROA@mail.gmail.com \
--to=npache@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=alexander.atanasov@virtuozzo.com \
--cc=arnd@arndb.de \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=cgroups@vger.kernel.org \
--cc=david@redhat.com \
--cc=decui@microsoft.com \
--cc=eperezma@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=haiyangz@microsoft.com \
--cc=hannes@cmpxchg.org \
--cc=jasowang@redhat.com \
--cc=jerrin.shaji-george@broadcom.com \
--cc=jgross@suse.com \
--cc=kanchana.p.sridhar@intel.com \
--cc=kys@microsoft.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=mst@redhat.com \
--cc=muchun.song@linux.dev \
--cc=nphamcs@gmail.com \
--cc=oleksandr_tyshchenko@epam.com \
--cc=roman.gushchin@linux.dev \
--cc=shakeel.butt@linux.dev \
--cc=sstabellini@kernel.org \
--cc=virtualization@lists.linux.dev \
--cc=wei.liu@kernel.org \
--cc=xen-devel@lists.xenproject.org \
--cc=xuanzhuo@linux.alibaba.com \
--cc=yosry.ahmed@linux.dev \
/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