[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACSyD1NisD-ZggRz0BaxUdJ9so4j-sKPZi361HJAum3+bHO+tQ@mail.gmail.com>
Date: Thu, 3 Apr 2025 15:47:08 +0800
From: Zhongkun He <hezhongkun.hzk@...edance.com>
To: Michal Koutný <mkoutny@...e.com>
Cc: Shakeel Butt <shakeel.butt@...ux.dev>, Johannes Weiner <hannes@...xchg.org>,
Roman Gushchin <roman.gushchin@...ux.dev>, Jingxiang Zeng <linuszeng@...cent.com>,
akpm@...ux-foundation.org, linux-mm@...ck.org, cgroups@...r.kernel.org,
linux-kernel@...r.kernel.org, mhocko@...nel.org, muchun.song@...ux.dev,
kasong@...cent.com
Subject: Re: [External] Re: [RFC 2/5] memcontrol: add boot option to enable
memsw account on dfl
On Wed, Apr 2, 2025 at 9:42 PM Michal Koutný <mkoutny@...e.com> wrote:
>
> On Thu, Mar 20, 2025 at 08:33:09AM -0700, Shakeel Butt <shakeel.butt@...ux.dev> wrote:
> > However I want us to discuss and decide the semantics of
> > memsw from scratch rather than adopting v1 semantics.
>
> +1
>
> > Also we should discuss how memsw and swap limits would interact and
> > what would be the appropriate default.
>
> Besides more complicated implementation, merged memsw won't represent an
> actual resource.
>
> So I'd be interested in use cases (other than "used to it from v1") that
> cannot be controlled with separate memory. and swap. limits.
>
Hi Michal
We encountered an issue, which is also a real use case. With memory offloading,
we can move some cold pages to swap. Suppose an application’s peak memory
usage at certain times is 10GB, while at other times, it exists in a
combination of
memory and swap. If we set limits on memory or swap separately, it would lack
flexibility—sometimes it needs 1GB memory + 9GB swap, sometimes 5GB
memory + 5GB swap, or even 10GB memory + 0GB swap. Therefore, we strongly
hope to use the mem+swap charging method in cgroupv2
>
> 0.02€,
> Michal
Powered by blists - more mailing lists