]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mm: split a folio in minimum folio order chunks
authorLuis Chamberlain <mcgrof@kernel.org>
Thu, 22 Aug 2024 13:50:12 +0000 (15:50 +0200)
committerChristian Brauner <brauner@kernel.org>
Mon, 2 Sep 2024 14:18:38 +0000 (16:18 +0200)
commite220917fa50774fedb27c075df2261fd664e8ca3
treed383afb1c8518c346f650955a41c899ca0e01138
parent26cfdb395eefdb2d34e51184d8466ee04a1618d5
mm: split a folio in minimum folio order chunks

split_folio() and split_folio_to_list() assume order 0, to support
minorder for non-anonymous folios, we must expand these to check the
folio mapping order and use that.

Set new_order to be at least minimum folio order if it is set in
split_huge_page_to_list() so that we can maintain minimum folio order
requirement in the page cache.

Update the debugfs write files used for testing to ensure the order
is respected as well. We simply enforce the min order when a file
mapping is used.

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
Link: https://lore.kernel.org/r/20240902124931.506061-2-kernel@pankajraghav.com
Link: https://lore.kernel.org/r/20240822135018.1931258-5-kernel@pankajraghav.com
Tested-by: David Howells <dhowells@redhat.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Zi Yan <ziy@nvidia.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
include/linux/huge_mm.h
mm/huge_memory.c