lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240301164444.3799288-10-kernel@pankajraghav.com>
Date: Fri,  1 Mar 2024 17:44:40 +0100
From: "Pankaj Raghav (Samsung)" <kernel@...kajraghav.com>
To: linux-fsdevel@...r.kernel.org,
	linux-xfs@...r.kernel.org
Cc: djwong@...nel.org,
	mcgrof@...nel.org,
	linux-mm@...ck.org,
	hare@...e.de,
	david@...morbit.com,
	akpm@...ux-foundation.org,
	gost.dev@...sung.com,
	linux-kernel@...r.kernel.org,
	chandan.babu@...cle.com,
	willy@...radead.org,
	Pankaj Raghav <p.raghav@...sung.com>
Subject: [PATCH v2 09/13] mm: do not split a folio if it has minimum folio order requirement

From: Pankaj Raghav <p.raghav@...sung.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@...sung.com>
Signed-off-by: Luis Chamberlain <mcgrof@...nel.org>
Reviewed-by: Hannes Reinecke <hare@...e.de>
---
 mm/huge_memory.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 81fd1ba57088..6ec3417638a1 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -3030,6 +3030,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);
 
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ