linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jialin Wang <wjl.linux@gmail.com>
To: Harry Yoo <harry.yoo@oracle.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	 David Hildenbrand <david@redhat.com>,
	Michal Hocko <mhocko@kernel.org>,
	 Qi Zheng <zhengqi.arch@bytedance.com>,
	Shakeel Butt <shakeel.butt@linux.dev>,
	 Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
	linux-mm@kvack.org,  linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND] mm/vmscan: remove redundant folio_test_swapbacked()
Date: Tue, 12 Aug 2025 03:21:12 +0800	[thread overview]
Message-ID: <CAG18JnwT1P6W6AwQX0nKDiGTBtObzVXNO7RgO2B-ipnC3D4xGg@mail.gmail.com> (raw)
In-Reply-To: <aJo7_B6cQc1EucA1@hyeyoo>

On Tue, Aug 12, 2025 at 2:53 AM Harry Yoo <harry.yoo@oracle.com> wrote:
>
> This is marked as RESEND, but which patch is it a resend of?
> I can’t find the original one.
>
I sent the original one to the wrong mailing list and missed proper cc's, sorry.
https://lore.kernel.org/lkml/20250811181839.40336-1-wjl.linux@gmail.com/

> On Tue, Aug 12, 2025 at 02:25:00AM +0800, Jialin Wang wrote:
> > When !folio_is_file_lru(folio) is false, it implies that
> > !folio_test_swapbacked(folio) must be true.
>
> That is not true.
>
This is the definition of folio_is_file_lru() in
include/linux/mm_inline.h line 28:
static inline int folio_is_file_lru(struct folio *folio)
{
return !folio_test_swapbacked(folio);
}

> MADV_FREE pages are anonymous pages that are not swapbacked
> (and thus can be reclaimed without pageout if they are clean).
>
Thanks for the explanation! I'm new to memory management, so this is
really helpful for me to learn.

Best regards,
Jialin Wang


  reply	other threads:[~2025-08-11 19:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-11 18:25 Jialin Wang
2025-08-11 18:52 ` Harry Yoo
2025-08-11 19:21   ` Jialin Wang [this message]
2025-08-11 19:40     ` Harry Yoo

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=CAG18JnwT1P6W6AwQX0nKDiGTBtObzVXNO7RgO2B-ipnC3D4xGg@mail.gmail.com \
    --to=wjl.linux@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=hannes@cmpxchg.org \
    --cc=harry.yoo@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=mhocko@kernel.org \
    --cc=shakeel.butt@linux.dev \
    --cc=zhengqi.arch@bytedance.com \
    /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