linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Michał Cłapiński" <mclapinski@google.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Pasha Tatashin <tatashin@google.com>,
	linux-mm@kvack.org,  linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/2] mm/compaction: make proactive compaction high watermark configurable via sysctl
Date: Thu, 30 Jan 2025 19:15:38 +0100	[thread overview]
Message-ID: <CAAi7L5cc7q=3f_vF+7AYE15WTRDs8Tr1mkb6cm5YuU8n8Wu0cg@mail.gmail.com> (raw)
In-Reply-To: <e524abae-918b-4b23-8648-bf56f78464de@suse.cz>

On Thu, Jan 30, 2025 at 3:18 PM Vlastimil Babka <vbabka@suse.cz> wrote:
>
> On 1/28/25 02:18, Andrew Morton wrote:
> > On Mon, 27 Jan 2025 22:50:20 +0100 Michal Clapinski <mclapinski@google.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?
>
>


  reply	other threads:[~2025-01-30 18:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-27 21:50 [PATCH v3 0/2] mm/compaction: allow more aggressive proactive compaction Michal Clapinski
2025-01-27 21:50 ` [PATCH v3 1/2] mm/compaction: remove low watermark cap for " Michal Clapinski
2025-01-28  1:17   ` Andrew Morton
2025-01-27 21:50 ` [PATCH v3 2/2] mm/compaction: make proactive compaction high watermark configurable via sysctl Michal Clapinski
2025-01-28  1:18   ` Andrew Morton
2025-01-30 14:18     ` Vlastimil Babka
2025-01-30 18:15       ` Michał Cłapiński [this message]
2025-01-28  1:07 ` [PATCH v3 0/2] mm/compaction: allow more aggressive proactive compaction Andrew Morton
2025-03-17  1:02 ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAi7L5cc7q=3f_vF+7AYE15WTRDs8Tr1mkb6cm5YuU8n8Wu0cg@mail.gmail.com' \
    --to=mclapinski@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=tatashin@google.com \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox