Message ID | 20240213093713.1753368-9-kernel@pankajraghav.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | enable bs > ps in XFS | expand |
On 2/13/24 10:37, Pankaj Raghav (Samsung) wrote: > From: Pankaj Raghav <p.raghav@samsung.com> > > As we don't have a way to split a folio to a any given lower folio > order yet, avoid splitting the folio in split_huge_page_to_list() if it > has a minimum folio order requirement. > > Signed-off-by: Pankaj Raghav <p.raghav@samsung.com> > Signed-off-by: Luis Chamberlain <mcgrof@kernel.org> > --- > mm/huge_memory.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/mm/huge_memory.c b/mm/huge_memory.c > index 94c958f7ebb5..d897efc51025 100644 > --- a/mm/huge_memory.c > +++ b/mm/huge_memory.c > @@ -3026,6 +3026,19 @@ int split_huge_page_to_list(struct page *page, struct list_head *list) > goto out; > } > > + /* > + * Do not split if mapping has minimum folio order > + * requirement. > + * > + * XXX: Once we have support for splitting to any lower > + * folio order, then it could be split based on the > + * min_folio_order. > + */ > + if (mapping_min_folio_order(mapping)) { > + ret = -EAGAIN; > + goto out; > + } > + > gfp = current_gfp_context(mapping_gfp_mask(mapping) & > GFP_RECLAIM_MASK); > Reviewed-by: Hannes Reinecke <hare@suse.de> Cheers, Hannes
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 94c958f7ebb5..d897efc51025 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -3026,6 +3026,19 @@ int split_huge_page_to_list(struct page *page, struct list_head *list) goto out; } + /* + * Do not split if mapping has minimum folio order + * requirement. + * + * XXX: Once we have support for splitting to any lower + * folio order, then it could be split based on the + * min_folio_order. + */ + if (mapping_min_folio_order(mapping)) { + ret = -EAGAIN; + goto out; + } + gfp = current_gfp_context(mapping_gfp_mask(mapping) & GFP_RECLAIM_MASK);