[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <4BEA4D18-A71B-40EB-82C0-6450B78C4627@linux.dev>
Date: Tue, 22 Oct 2024 15:30:11 +0800
From: Muchun Song <muchun.song@...ux.dev>
To: Ryan Roberts <ryan.roberts@....com>
Cc: Johannes Weiner <hannes@...xchg.org>,
Michal Hocko <mhocko@...nel.org>,
Roman Gushchin <roman.gushchin@...ux.dev>,
Shakeel Butt <shakeel.butt@...ux.dev>,
Andrew Morton <akpm@...ux-foundation.org>,
cgroups@...r.kernel.org,
linux-mm@...ck.org,
linux-kernel@...r.kernel.org,
Michal Hocko <mhocko@...e.com>
Subject: Re: [PATCH v2] mm/memcontrol: Fix seq_buf size to save memory when
PAGE_SIZE is large
> On Oct 21, 2024, at 21:00, Ryan Roberts <ryan.roberts@....com> wrote:
>
> Previously the seq_buf used for accumulating the memory.stat output was
> sized at PAGE_SIZE. But the amount of output is invariant to PAGE_SIZE;
> If 4K is enough on a 4K page system, then it should also be enough on a
> 64K page system, so we can save 60K on the static buffer used in
> mem_cgroup_print_oom_meminfo(). Let's make it so.
>
> This also has the beneficial side effect of removing a place in the code
> that assumed PAGE_SIZE is a compile-time constant. So this helps our
> quest towards supporting boot-time page size selection.
>
> Signed-off-by: Ryan Roberts <ryan.roberts@....com>
> Acked-by: Johannes Weiner <hannes@...xchg.org>
> Acked-by: Shakeel Butt <shakeel.butt@...ux.dev>
> Acked-by: Michal Hocko <mhocko@...e.com>
> Acked-by: Roman Gushchin <roman.gushchin@...ux.dev>
Acked-by: Muchun Song <muchun.song@...ux.dev>
Thanks.
Powered by blists - more mailing lists