All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rik van Riel <riel@surriel.com>
To: David Hildenbrand <david@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: Chris Li <chrisl@kernel.org>, Ryan Roberts <ryan.roberts@arm.com>,
	 "Matthew Wilcox (Oracle)" <willy@infradead.org>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	 kernel-team@meta.com
Subject: Re: [PATCH] mm: add maybe_lru_add_drain() that only drains when threshold is exceeded
Date: Thu, 19 Dec 2024 12:50:00 -0500	[thread overview]
Message-ID: <ca363982c86fa57fe35b4723930a5d1f43e4210a.camel@surriel.com> (raw)
In-Reply-To: <de8c3dc8-7d36-419b-84f5-f886c6b724e6@redhat.com>

On Thu, 2024-12-19 at 18:23 +0100, David Hildenbrand wrote:
> On 19.12.24 15:11, Rik van Riel wrote:
> > 
> > I think we need to free those pending pages at
> > some point. They can't accumulate there forever.
> > However, I am not sure where those points should
> > be.
> 
> The number of entries are limited, 

...
> folio_batch_add() drains if folio_batch_space() returns 0 (no slots
> left).
> 
> Apparently we have PAGEVEC_SIZE slots, which is 31 ... 31 * PAGE_SIZE
> stranded there.

Sure enough! That was the piece I was missing last night.

I guess we can get away with just draining these in the
reclaim and compaction paths, and not touch them the
rest of the time?

That could be a nice improvement in some situations.

-- 
All Rights Reversed.


      reply	other threads:[~2024-12-19 17:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-18 16:56 [PATCH] mm: add maybe_lru_add_drain() that only drains when threshold is exceeded Rik van Riel
2024-12-18 20:20 ` Shakeel Butt
2024-12-19  3:13   ` Rik van Riel
2024-12-19 17:00     ` Shakeel Butt
2024-12-19 13:47 ` David Hildenbrand
2024-12-19 14:11   ` Rik van Riel
2024-12-19 17:23     ` David Hildenbrand
2024-12-19 17:50       ` Rik van Riel [this message]

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=ca363982c86fa57fe35b4723930a5d1f43e4210a.camel@surriel.com \
    --to=riel@surriel.com \
    --cc=akpm@linux-foundation.org \
    --cc=chrisl@kernel.org \
    --cc=david@redhat.com \
    --cc=kernel-team@meta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ryan.roberts@arm.com \
    --cc=willy@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.