Received: by 2002:ab2:2994:0:b0:1ef:ca3e:3cd5 with SMTP id n20csp107018lqb; Thu, 14 Mar 2024 06:46:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWERs4vpB1C/4E0O9ggoBRfbRpoKhLHXhzegj3r6c+k9Vr/0PKyCGF7OuauRTxcXPOBxsEYGd++jpT0vkpuXaTjP1xsehnwYTRQoUbivQ== X-Google-Smtp-Source: AGHT+IEYvobSjq3WqZZpLv7ijxxpIHZFX0v9ld7y9QLi74BkQYms4uE16k/UhCd66lX6/unZAm1n X-Received: by 2002:a0c:e0d4:0:b0:690:bfb2:8a53 with SMTP id x20-20020a0ce0d4000000b00690bfb28a53mr1499504qvk.64.1710424007146; Thu, 14 Mar 2024 06:46:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710424007; cv=pass; d=google.com; s=arc-20160816; b=dTjvJ0QMYLkSdN5L7rBgoytC5A4npZFgTchqASsZcxKbY+TMU6yDYkrj2cR3417TGg J0cerLVl+rAUuJpWylnYyetQA00VTZzMh0ahju6YPDJSuYil0VgBIu92s5FQGmuJUNIR NoPet9yIeZsjCj6gH9Mb2HXCt5r2RQ9nQNXworBBJJtHrbzPwd2PNTaXZoMAIN+b57ut dRrLp69DR8zRHZspxoSqvrL4XLYjGChzbZybkT1qgR9LJC3HP4pKhHLr0m3tIRm72ucu ko+QzxXl2XsGxChvKhqMZM4Abx8vrC9S+CKTl8XHMclNzdISA15pR5xWYIO/iGIQBUSD t5rg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=F3Xg5bE7lOUEiWrLgvJkawBGempm7FqinU/8gfujPB8=; fh=j3uz2NgZFfq57/Snoylk35aIHaL6SCDmmQDWQGY3sTA=; b=SSEh54TB0HvYKexvG4lQPlJ80IGDVzjIzo2cgmvJuZUxb6um+LAflm+5PeEvXW2mnb tipRZ0hpSRLyhOCrSuQ2Zrmb+47k243mGemQWG5E69JeRurYNMIEOnmLTowtoBp86AnS 58gmBODIYHyOrNc5V4PXMpr7ZpEbddbQQFYndEeWoN3ygwk+/oIGUSQv7e0poldGcjaQ 2DTinZMIz/L1/uDbbVOH/lXmGh8zgmKqQsXEPDXqltFfyid5WRm1n7jFfDVYr3uTQ6ML 8T6dEiP+gdclYCFy7Y/iFCPVE+eTon2bLTTg0sJOG06aoRZlnsQTxP6vkZVVqPsDfXpx optQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@pankajraghav.com header.s=MBO0001 header.b=L+OtKexa; arc=pass (i=1 spf=pass spfdomain=pankajraghav.com dkim=pass dkdomain=pankajraghav.com dmarc=pass fromdomain=pankajraghav.com); spf=pass (google.com: domain of linux-kernel+bounces-102178-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102178-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pankajraghav.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id e7-20020a0562141d0700b0068ed5f45265si698450qvd.475.2024.03.14.06.46.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Mar 2024 06:46:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-102178-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@pankajraghav.com header.s=MBO0001 header.b=L+OtKexa; arc=pass (i=1 spf=pass spfdomain=pankajraghav.com dkim=pass dkdomain=pankajraghav.com dmarc=pass fromdomain=pankajraghav.com); spf=pass (google.com: domain of linux-kernel+bounces-102178-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102178-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pankajraghav.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 6F2D61C24789 for ; Wed, 13 Mar 2024 18:17:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ED31119988B; Wed, 13 Mar 2024 17:03:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pankajraghav.com header.i=@pankajraghav.com header.b="L+OtKexa" Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [80.241.56.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 861941991AA; Wed, 13 Mar 2024 17:03:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.241.56.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710349412; cv=none; b=jZNQbjyKO6pRF57moZfmtko1tfFf/oETjMlksY5irOEsLu+bxr5fNtkTpfEC/are046OKlC7ABBdore2PQ1gNXjJjtC//ZJK9dKl6K6Y5fMnKC7HALkOOw46aVcUOO6THYT8k0Y0P9EfMYEUW6rp+WJaNyXHQQm3zJTs4sc3UAY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710349412; c=relaxed/simple; bh=RpGDv7xjt1Tn0NAFmnUJ4dRChi0PW0zUu2AGhx/ey2I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CzhHdJsNnl8c/nZ/MsTh7N7lX/K6Ndgf37fELRahci5woO2FL0VrRgRaKpCDAWaUFuo3V6G5UKaQHU8NCi7EwuiNDh3ECyfCsmrA54rQrNAFavMDuzhgCa7/CQxPHrl9bk0W4r4qA3sTCEaBXEZuelQX7JG3UHRcWPqSWCgt0fM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=pankajraghav.com; spf=pass smtp.mailfrom=pankajraghav.com; dkim=pass (2048-bit key) header.d=pankajraghav.com header.i=@pankajraghav.com header.b=L+OtKexa; arc=none smtp.client-ip=80.241.56.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=pankajraghav.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pankajraghav.com Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4Tvxfl1Ftrz9sqV; Wed, 13 Mar 2024 18:03:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pankajraghav.com; s=MBO0001; t=1710349407; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=F3Xg5bE7lOUEiWrLgvJkawBGempm7FqinU/8gfujPB8=; b=L+OtKexa8lscvnV+tP6Qwfgscep0OokKJI+6VWJsVSvNCdYGHpjfa+oUx+M4CnU+flHItA Z7biTY7xoXAJWfjX8BUdzqizkXIbR083jNK0fC/LUb0rJ1ZBAH9+6gYFAQuNpHE9vI7/wL zbWzflaswuuxg1W3On8MRJaz9vHDwPBmneBEUngNZBU/bneNO4W9RdsLF/SuGWBcq4rFBL EDyHiJ9W22Go64+oMoK0yj/4z70enqNwtiC/3W/sgqAhc0pY2QxwX3uOcaTcmNTYsts4WV zcm5NCF1rZ91I8S3vS/p0psodGFJnSjvTeYE+LRQIBxvVmMN5SOOT2jfF38FPw== From: "Pankaj Raghav (Samsung)" To: willy@infradead.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org Cc: gost.dev@samsung.com, chandan.babu@oracle.com, hare@suse.de, mcgrof@kernel.org, djwong@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, david@fromorbit.com, akpm@linux-foundation.org, Pankaj Raghav Subject: [PATCH v3 07/11] mm: do not split a folio if it has minimum folio order requirement Date: Wed, 13 Mar 2024 18:02:49 +0100 Message-ID: <20240313170253.2324812-8-kernel@pankajraghav.com> In-Reply-To: <20240313170253.2324812-1-kernel@pankajraghav.com> References: <20240313170253.2324812-1-kernel@pankajraghav.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4Tvxfl1Ftrz9sqV From: Pankaj Raghav 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 Signed-off-by: Luis Chamberlain Reviewed-by: Hannes Reinecke --- 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