From: Riwan <coefficriwan@gmail.com>
To: "Andrew Morton (maintainer:MEMORY MANAGEMENT - RMAP (REVERSE
MAPPING))" <akpm@linux-foundation.org>,
"David Hildenbrand (maintainer:MEMORY MANAGEMENT - RMAP (REVERSE
MAPPING))" <david@kernel.org>,
"Lorenzo Stoakes (maintainer:MEMORY MANAGEMENT - RMAP (REVERSE
MAPPING))" <lorenzo.stoakes@oracle.com>,
"Rik van Riel (reviewer:MEMORY MANAGEMENT - RMAP (REVERSE
MAPPING))" <riel@surriel.com>,
"Liam R. Howlett (reviewer:MEMORY MANAGEMENT - RMAP (REVERSE
MAPPING))" <Liam.Howlett@oracle.com>,
"Vlastimil Babka (reviewer:MEMORY MANAGEMENT - RMAP (REVERSE
MAPPING))" <vbabka@suse.cz>,
"Harry Yoo (reviewer:MEMORY MANAGEMENT - RMAP (REVERSE
MAPPING))" <harry.yoo@oracle.com>,
"Jann Horn (reviewer:MEMORY MANAGEMENT - RMAP (REVERSE
MAPPING))" <jannh@google.com>,
"Zi Yan (reviewer:MEMORY MANAGEMENT - MEMORY POLICY AND
MIGRATION)" <ziy@nvidia.com>,
"Matthew Brost (reviewer:MEMORY MANAGEMENT - MEMORY POLICY AND
MIGRATION)" <matthew.brost@intel.com>,
"Joshua Hahn (reviewer:MEMORY MANAGEMENT - MEMORY POLICY AND
MIGRATION)" <joshua.hahnjy@gmail.com>,
"Rakie Kim (reviewer:MEMORY MANAGEMENT - MEMORY POLICY AND
MIGRATION)" <rakie.kim@sk.com>,
"Byungchul Park (reviewer:MEMORY MANAGEMENT - MEMORY POLICY AND
MIGRATION)" <byungchul@sk.com>,
"Gregory Price (reviewer:MEMORY MANAGEMENT - MEMORY POLICY AND
MIGRATION)" <gourry@gourry.net>,
"Ying Huang (reviewer:MEMORY MANAGEMENT - MEMORY POLICY AND
MIGRATION)" <ying.huang@linux.alibaba.com>,
"Alistair Popple (reviewer:MEMORY MANAGEMENT - MEMORY POLICY AND
MIGRATION)" <apopple@nvidia.com>,
"open list:MEMORY MANAGEMENT - RMAP (REVERSE MAPPING)"
<linux-mm@kvack.org>, open list <linux-kernel@vger.kernel.org>
Subject: mm/rmap: Should vma_migratable be checked in try_to_migrate_one?
Date: Wed, 11 Mar 2026 14:46:55 +0100 [thread overview]
Message-ID: <83E1B606-C461-4FC1-BFF8-FC2BEFDCE2B6@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1513 bytes --]
Hi, I’m a phd student working on memory management and I have the following question:
Is it intentional to not check for `vma_migratable` in `try_to_migrate_one` ?
If the vma is not migratable, it would be logical to cancel the page migration at this point.
From what I understand, `vma_migratable` is called to check if a pages in a specific VMA can be migrated or not.
From what I can see, user-facing migration paths (mbind, move_pages) and NUMA balancing already check wether migration is possible or not with `vma_migratable`, but other migration path, such as compaction with kcompactd, ignore this check.
As `try_to_migrate_one` is the only place where we have access to the vma (due to reverse mapping), it would be logical to check here for `vma_migratable` (before we only have access to the folio).
I’m still new to the Linux Kernel, and may have missed critical subsystem / behavior, and I would be curious to know if this was overlooked or if there is a reason behind not calling `vma_migratable`.
From what I could get, here is the relevant context:
- Implem of vma_migratable : mm/mempolicy: check hugepage migration is supported by arch in vma_migratable() (https://lore.kernel.org/all/20200402041052.Y4zsoYman%25akpm@linux-foundation.org/)
- Implem of try_to_migrate_one, previously managed in try_to_unmap_one : mm/rmap: split migration into its own function (https://lore.kernel.org/all/20210701015416.0t4MkxtDR%25akpm@linux-foundation.org/)
Thanks a lot
Riwan Coëffic
[-- Attachment #2: Type: text/html, Size: 2004 bytes --]
next reply other threads:[~2026-03-11 13:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-11 13:46 Riwan [this message]
2026-03-12 16:31 ` Gregory Price
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=83E1B606-C461-4FC1-BFF8-FC2BEFDCE2B6@gmail.com \
--to=coefficriwan@gmail.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=apopple@nvidia.com \
--cc=byungchul@sk.com \
--cc=david@kernel.org \
--cc=gourry@gourry.net \
--cc=harry.yoo@oracle.com \
--cc=jannh@google.com \
--cc=joshua.hahnjy@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=matthew.brost@intel.com \
--cc=rakie.kim@sk.com \
--cc=riel@surriel.com \
--cc=vbabka@suse.cz \
--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