Re: [PATCH v8 01/10] fs: Allow fine-grained control of folio sizes
From: Matthew Wilcox
Date: Tue Jul 09 2024 - 13:07:56 EST
On Tue, Jul 09, 2024 at 04:29:07PM +0000, Pankaj Raghav (Samsung) wrote:
> +++ b/include/linux/pagemap.h
> @@ -394,13 +394,24 @@ static inline void mapping_set_folio_order_range(struct address_space *mapping,
> unsigned int min,
> unsigned int max)
> {
> - if (!IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE))
> + if (!IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE)) {
> + VM_WARN_ONCE(1,
> + "THP needs to be enabled to support mapping folio order range");
> return;
> + }
No. Filesystems call mapping_set_folio_order_range() without it being
conditional on CONFIG_TRANSPARENT_HUGEPAGE. Usually that takes the
form of an unconditional call to mapping_set_large_folios().