[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <q3m42iuxahsjrskuio3ajz2edrisiw56cwy2etx2jyht5l7jzq@ttbsrvgu4mvl>
Date: Thu, 1 Feb 2024 14:57:22 +0100
From: Michal Koutný <mkoutny@...e.com>
To: "T.J. Mercier" <tjmercier@...gle.com>
Cc: Johannes Weiner <hannes@...xchg.org>, Michal Hocko <mhocko@...nel.org>,
Roman Gushchin <roman.gushchin@...ux.dev>, Shakeel Butt <shakeelb@...gle.com>,
Muchun Song <muchun.song@...ux.dev>, Andrew Morton <akpm@...ux-foundation.org>,
Efly Young <yangyifei03@...ishou.com>, android-mm@...gle.com, yuzhao@...gle.com,
cgroups@...r.kernel.org, linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: memcg: Use larger chunks for proactive reclaim
Hello.
On Wed, Jan 31, 2024 at 04:24:41PM +0000, "T.J. Mercier" <tjmercier@...gle.com> wrote:
> reclaimed = try_to_free_mem_cgroup_pages(memcg,
> - min(nr_to_reclaim - nr_reclaimed, SWAP_CLUSTER_MAX),
> + max((nr_to_reclaim - nr_reclaimed) / 4,
> + (nr_to_reclaim - nr_reclaimed) % 4),
The 1/4 factor looks like magic.
Commit 0388536ac291 says:
| In theory, the amount of reclaimed would be in [request, 2 * request).
Doesn't this suggest 1/2 as a better option? (I didn't pursue the
theory.)
Also IMO importantly, when nr_to_reclaim - nr_reclaimed is less than 8,
the formula gives arbitrary (unrelated to delta's magnitude) values.
Regards,
Michal
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists