linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Weiner <hannes@cmpxchg.org>
To: Hyeongtak Ji <hyeongtak.ji@gmail.com>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, Hyeongtak Ji <hyeongtak.ji@sk.com>
Subject: Re: [PATCH] mm/vmscan: consider previously reclaimed pages in shrink_lruvec()
Date: Tue, 7 Nov 2023 13:33:46 -0500	[thread overview]
Message-ID: <20231107183346.GA3789583@cmpxchg.org> (raw)
In-Reply-To: <1691402476-4838-1-git-send-email-hyeongtak.ji@gmail.com>

On Mon, Aug 07, 2023 at 07:01:16PM +0900, Hyeongtak Ji wrote:
> shrink_lruvec() currently ignores previously reclaimed pages in
> scan_control->nr_reclaimed.  This can lead shrink_lruvec() to reclaiming
> more pages than expected.
> 
> This patch fixes shrink_lruvec() to take into account the previously
> reclaimed pages.

Do you run into real world issues from this? The code has been like
this for at least a decade.

It's an intentional choice to ensure fairness across all visited
cgroups. sc->nr_to_reclaim is 32 pages or less - it's only to guard
against extreme overreclaim. But we want to make sure we reclaim a bit
from all cgroups, rather than always hit the first one and then bail.


  reply	other threads:[~2023-11-07 18:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-07 10:01 Hyeongtak Ji
2023-11-07 18:33 ` Johannes Weiner [this message]
2023-11-08 10:25   ` Hyeongtak Ji

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=20231107183346.GA3789583@cmpxchg.org \
    --to=hannes@cmpxchg.org \
    --cc=akpm@linux-foundation.org \
    --cc=hyeongtak.ji@gmail.com \
    --cc=hyeongtak.ji@sk.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /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