From: Matthew Wilcox <willy@infradead.org>
To: Usama Arif <usama.arif@linux.dev>
Cc: "David Hildenbrand (Arm)" <david@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
npache@redhat.com, ziy@nvidia.com, linux-mm@kvack.org,
matthew.brost@intel.com, joshua.hahnjy@gmail.com,
hannes@cmpxchg.org, rakie.kim@sk.com, byungchul@sk.com,
gourry@gourry.net, ying.huang@linux.alibaba.com,
apopple@nvidia.com, linux-kernel@vger.kernel.org,
kernel-team@meta.com
Subject: Re: [PATCH] mm: migrate: requeue destination folio on deferred split queue
Date: Fri, 6 Mar 2026 16:08:03 +0000 [thread overview]
Message-ID: <aar740E8K7SOy1qJ@casper.infradead.org> (raw)
In-Reply-To: <64051a59-680f-40ae-b291-b884aeb7c77b@linux.dev>
On Fri, Mar 06, 2026 at 05:12:38PM +0300, Usama Arif wrote:
> + /*
> + * Record whether the source folio is on the deferred split queue
> + * before move_to_new_folio(), which unqueues it via
> + * __folio_migrate_mapping().
> + */
> + if (folio_test_large(src) && folio_test_large_rmappable(src) &&
> + !data_race(list_empty(&src->_deferred_list)))
Why do you need data_race() here? list_empty() contains a READ_ONCE()
so shouldn't be necessary?
> + old_page_state |= PAGE_WAS_ON_DEFERRED_SPLIT;
You've done a great job of the naming. So much so that the comment
seems entirely unnecessary?
> + /*
> + * Requeue the destination folio on the deferred split queue if
> + * the source was on the queue. The source is unqueued in
> + * __folio_migrate_mapping(), so we record and check the state
> + * from before move_to_new_folio().
> + */
> + if (old_page_state & PAGE_WAS_ON_DEFERRED_SPLIT)
> + deferred_split_folio(dst, false);
Again, I'm not sure the comment says anything that the code doesn't?
next prev parent reply other threads:[~2026-03-06 16:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-06 13:35 Usama Arif
2026-03-06 13:49 ` David Hildenbrand (Arm)
2026-03-06 14:12 ` Usama Arif
2026-03-06 14:46 ` Zi Yan
2026-03-06 16:15 ` Usama Arif
2026-03-06 16:23 ` David Hildenbrand (Arm)
2026-03-06 16:26 ` Zi Yan
2026-03-06 16:08 ` Matthew Wilcox [this message]
2026-03-06 16:19 ` Usama Arif
2026-03-06 13:51 ` David Hildenbrand (Arm)
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=aar740E8K7SOy1qJ@casper.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=apopple@nvidia.com \
--cc=byungchul@sk.com \
--cc=david@kernel.org \
--cc=gourry@gourry.net \
--cc=hannes@cmpxchg.org \
--cc=joshua.hahnjy@gmail.com \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=matthew.brost@intel.com \
--cc=npache@redhat.com \
--cc=rakie.kim@sk.com \
--cc=usama.arif@linux.dev \
--cc=ying.huang@linux.alibaba.com \
--cc=ziy@nvidia.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