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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAi7L5cc7q=3f_vF+7AYE15WTRDs8Tr1mkb6cm5YuU8n8Wu0cg@mail.gmail.com>
Date: Thu, 30 Jan 2025 19:15:38 +0100
From: Michał Cłapiński <mclapinski@...gle.com>
To: Vlastimil Babka <vbabka@...e.cz>
Cc: Andrew Morton <akpm@...ux-foundation.org>, Pasha Tatashin <tatashin@...gle.com>, linux-mm@...ck.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 2/2] mm/compaction: make proactive compaction high
 watermark configurable via sysctl

On Thu, Jan 30, 2025 at 3:18 PM Vlastimil Babka <vbabka@...e.cz> wrote:
>
> On 1/28/25 02:18, Andrew Morton wrote:
> > On Mon, 27 Jan 2025 22:50:20 +0100 Michal Clapinski <mclapinski@...gle.com> wrote:
> >
> >> Currently, the difference between the high and low watermarks for
> >> proactive compaction is hardcoded to 10. This hardcoded difference is
> >> too large for free page reporting to work well.
> >>
> >> Add a new sysctl, `compaction_proactiveness_leeway`, to control the
> >> difference between the high and low watermarks.
> >>
> >
> > Oh dear, yet another tunable.  Is there any way in which we can
> > acceptably improve the kernel without adding this?
>
> compaction_proactiveness between 0 and 90 works as usual,
> thus up to low watermark of 10 and high watermark of 20
>
> compaction_proactiveness between 90 and 100 additionally reduces leeway,
> with value of 100 resulting of low = high = 0
>
> or some similar scheme, as long as a value of 100 does low = high = 0

Yes, I was thinking about
leeway = min(10, (100 - wmark_low) / 2);
to be able to get small leeway (and therefore more stable memory usage
on the host) without having to opt for very aggressive compaction
goals.

Both of those solutions have the disadvantage of introducing even
bigger changes to the behavior of systems that were already set to
compaction_proactiveness close to 100. Though I'm not sure how common
changing this tunable at all is.

> It's rather arbitrary but AFAIU does what Michal needs and higher
> proactiveness means more aggressive compaction.
>
> Question is, would anyone else find it useful to have low_watermark of 0 and
> high watermark of 10?
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ