Re: [PATCH v9 02/13] mm/gup: drop secretmem optimization from gup_fast_folio_allowed
From: David Hildenbrand (Red Hat)
Date: Thu Jan 15 2026 - 15:05:16 EST
On 1/14/26 14:45, Kalyazin, Nikita wrote:
From: Patrick Roy <patrick.roy@xxxxxxxxx>
This drops an optimization in gup_fast_folio_allowed() where
secretmem_mapping() was only called if CONFIG_SECRETMEM=y. secretmem is
enabled by default since commit b758fe6df50d ("mm/secretmem: make it on
by default"), so the secretmem check did not actually end up elided in
most cases anymore anyway.
This is in preparation of the generalization of handling mappings where
direct map entries of folios are set to not present. Currently,
mappings that match this description are secretmem mappings
(memfd_secret()). Later, some guest_memfd configurations will also fall
into this category.
Signed-off-by: Patrick Roy <patrick.roy@xxxxxxxxx>
Acked-by: Vlastimil Babka <vbabka@xxxxxxx>
Signed-off-by: Nikita Kalyazin <kalyazin@xxxxxxxxxx>
Acked-by: David Hildenbrand (Red Hat) <david@xxxxxxxxxx>
--
Cheers
David