lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d7ccdde7-39e5-411b-bcd7-63767c765129@redhat.com>
Date: Thu, 13 Mar 2025 23:33:14 +0100
From: David Hildenbrand <david@...hat.com>
To: Nico Pache <npache@...hat.com>
Cc: linux-hyperv@...r.kernel.org, linux-kernel@...r.kernel.org,
 virtualization@...ts.linux.dev, xen-devel@...ts.xenproject.org,
 linux-fsdevel@...r.kernel.org, linux-mm@...ck.org, cgroups@...r.kernel.org,
 kys@...rosoft.com, haiyangz@...rosoft.com, wei.liu@...nel.org,
 decui@...rosoft.com, jerrin.shaji-george@...adcom.com,
 bcm-kernel-feedback-list@...adcom.com, arnd@...db.de,
 gregkh@...uxfoundation.org, mst@...hat.com, jasowang@...hat.com,
 xuanzhuo@...ux.alibaba.com, eperezma@...hat.com, jgross@...e.com,
 sstabellini@...nel.org, oleksandr_tyshchenko@...m.com,
 akpm@...ux-foundation.org, hannes@...xchg.org, mhocko@...nel.org,
 roman.gushchin@...ux.dev, shakeel.butt@...ux.dev, muchun.song@...ux.dev,
 nphamcs@...il.com, yosry.ahmed@...ux.dev, kanchana.p.sridhar@...el.com,
 alexander.atanasov@...tuozzo.com
Subject: Re: [RFC 1/5] meminfo: add a per node counter for balloon drivers

On 13.03.25 18:35, Nico Pache wrote:
> On Thu, Mar 13, 2025 at 2:22 AM David Hildenbrand <david@...hat.com> wrote:
>>
>> On 13.03.25 00:04, Nico Pache wrote:
>>> On Wed, Mar 12, 2025 at 4:19 PM David Hildenbrand <david@...hat.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.

Also check balloon_page_enqueue, which ends up calling 
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.


Well, by implementing it in the compaction code that todo would be done :)

-- 
Cheers,

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ