Message ID | 20250116211042.741543-3-ziy@nvidia.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51A08C02188 for <linux-mm@archiver.kernel.org>; Thu, 16 Jan 2025 21:11:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9E7DB6B0085; Thu, 16 Jan 2025 16:11:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 997AF6B0088; Thu, 16 Jan 2025 16:11:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 838C66B0089; Thu, 16 Jan 2025 16:11:07 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 653E46B0085 for <linux-mm@kvack.org>; Thu, 16 Jan 2025 16:11:07 -0500 (EST) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id C4D30C1217 for <linux-mm@kvack.org>; Thu, 16 Jan 2025 21:11:06 +0000 (UTC) X-FDA: 83014560132.14.85882E9 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2046.outbound.protection.outlook.com [40.107.244.46]) by imf30.hostedemail.com (Postfix) with ESMTP id D411E8000E for <linux-mm@kvack.org>; Thu, 16 Jan 2025 21:11:03 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=mnyfl1v0; spf=pass (imf30.hostedemail.com: domain of ziy@nvidia.com designates 40.107.244.46 as permitted sender) smtp.mailfrom=ziy@nvidia.com; dmarc=pass (policy=reject) header.from=nvidia.com; arc=pass ("microsoft.com:s=arcselector10001:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1737061864; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=3071ObV6LLc9U2n4A4HNDAeWGiw4e+9oj47G1aIi6QM=; b=Iapu9SYcHDPO5YY8H8pZQBk6qB11pU28/cA+nZ9BmnyIjtOS3yvlqoXXJESiI2o3dvcnrP 5kn9tTaAI0hX6yksQhFtbT2IHrhPCO8s/727iECoWwLWapJQep9FpUkpYa4Dvxod4dbmN0 rwnj+oj+MTe08kXRSkIg2FHLjrxlF4k= ARC-Authentication-Results: i=2; imf30.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=mnyfl1v0; spf=pass (imf30.hostedemail.com: domain of ziy@nvidia.com designates 40.107.244.46 as permitted sender) smtp.mailfrom=ziy@nvidia.com; dmarc=pass (policy=reject) header.from=nvidia.com; arc=pass ("microsoft.com:s=arcselector10001:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1737061864; a=rsa-sha256; cv=pass; b=mbzrzcqGtW53YSZvfQDJnAm75pZy55YDcP3NUdSlzs6/HciyNpNFYN2YUnTnDlppQaIe98 S2oBhZ7gFN0Lc6CK4wwPRvTnul4YT2OCB8Y6Yl9csOr2PC07KAxvf+z9vE3Q7466WBALD6 NoWjK+zTrDecPsBP3/yz0zgCLOhpwa4= ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=dJvVKWCd2pk397RlFfxag1pf2HLc18EzWNOd/eIiZzw1G0dikOw4EGkovXDcK9YOYhZ8Nrg8vkA9lvLIaQUsOzHCaXAAoaGHkqTc8Rx1j9TC27AOQofio+s4/KN+TsuTQIHPp8WVVXla4L8Dcb+iHK/GRiFR+pO6hFI9wgUDz3u+fjHwtm+9ou4+fxpDvmtbS4R72EQYCtpAx6kFkHnHfcyFkgkfnm7NfsaeGpNoh0+ee/i/hMjeJK352dMAT8sx5Qyi2hLl1PsXpRLoW4zHqT81zsBuSBap/QkpyI7NJasej/JdHiTY8z9ZqpzNykq/UFKEZ3RVmmvay69h50xfIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3071ObV6LLc9U2n4A4HNDAeWGiw4e+9oj47G1aIi6QM=; b=Rn7mD6TgsOjEMJ4lrelAf3JQXPIJEuwm9c9NL+nzs15op+l/Aw20KjNPLsCfKrMLowkVvOqLfhKUcFRc/LSJ6Pqk6CT58dsRMFpNyv4k6XbOdsqnmM9xFDFAlFtjqMteYjFLZWGyKlUkTGx8REfoozZMjPHZFzvN61OLsXH1C5ABLKkraTHYAn6NyFsCzNGzQiC4fOn9t/WpIwdT0JDPtRBCPXHocL2FuBFGROoY8Jea+AsoToEJ7Z0VUCPwOOzCXs0+aXu5cur3KInwr4j8SqulXoWGB3nkOI2OglGzK1pY/tMEWjo/qwUQteTGa6QOI+NTbDuC78vNat/kmZ10WQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3071ObV6LLc9U2n4A4HNDAeWGiw4e+9oj47G1aIi6QM=; b=mnyfl1v0NwRCYLPfI+YWv0guSMrLTKdsXpylyX2Qjl6RQnm57KQd2XzpmXR8cBpM7uytZ/wqHgfhjLai1zkkM7mtcMxLJmVGOYlm43M1agyVpMJojYrI4iMWQmpwfJtRBOLz9EKrFIDbUK5ARMP5SzPHea2XNx+KwC4K2raRzLcVPR/Gu/nD48q6cIPLRMIMDNx0DZR/hQvCO/QlC04deu90AJn+hdl8hFAjzVO8PQWDQi94z8Z1xIOvm1hUnT58s9Rax2TNV2y81f1n/wUbe8emq+S0l3tULjRqa0Mqy1NztqcAwY8FP1/3hvXbZ3dIX9vwgvq6HorX9Px4G/QF/Q== Received: from DS7PR12MB9473.namprd12.prod.outlook.com (2603:10b6:8:252::5) by LV8PR12MB9232.namprd12.prod.outlook.com (2603:10b6:408:182::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.15; Thu, 16 Jan 2025 21:10:54 +0000 Received: from DS7PR12MB9473.namprd12.prod.outlook.com ([fe80::5189:ecec:d84a:133a]) by DS7PR12MB9473.namprd12.prod.outlook.com ([fe80::5189:ecec:d84a:133a%3]) with mapi id 15.20.8356.014; Thu, 16 Jan 2025 21:10:54 +0000 From: Zi Yan <ziy@nvidia.com> To: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>, "Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>, "Matthew Wilcox (Oracle)" <willy@infradead.org> Cc: Ryan Roberts <ryan.roberts@arm.com>, Hugh Dickins <hughd@google.com>, David Hildenbrand <david@redhat.com>, Yang Shi <yang@os.amperecomputing.com>, Miaohe Lin <linmiaohe@huawei.com>, Kefeng Wang <wangkefeng.wang@huawei.com>, Yu Zhao <yuzhao@google.com>, John Hubbard <jhubbard@nvidia.com>, Baolin Wang <baolin.wang@linux.alibaba.com>, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Zi Yan <ziy@nvidia.com> Subject: [PATCH v5 02/10] mm/huge_memory: allow split shmem large folio to any lower order Date: Thu, 16 Jan 2025 16:10:34 -0500 Message-ID: <20250116211042.741543-3-ziy@nvidia.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250116211042.741543-1-ziy@nvidia.com> References: <20250116211042.741543-1-ziy@nvidia.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BN0PR04CA0027.namprd04.prod.outlook.com (2603:10b6:408:ee::32) To DS7PR12MB9473.namprd12.prod.outlook.com (2603:10b6:8:252::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS7PR12MB9473:EE_|LV8PR12MB9232:EE_ X-MS-Office365-Filtering-Correlation-Id: f12e5b71-44cd-47a4-72a1-08dd3672436b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|366016|1800799024; X-Microsoft-Antispam-Message-Info: tZQYn1aM4/lPi5k8hOsgidyCiH+tkMJXtw5Oihff+tOiye1Dr1RZx4M2y4Vofn0ZFcUt7Xd004e7LqX+KFbROPR8ZYGDeSqUDLYgT+DPwx/72TUeLNt6VRYpGP3xZr4qP2NnJnRXA8IffG+IT4hwioMwDCPlM/oM28nhF8d7t22lsd5ajDTzr242zdT4o3MaVUyoAs4pBEL97nH9iG7O1kgeMlQCcOzDi2voQruQAuEc+hRlGzPbOfxFpZQcC3lOjPcjOw6YDMshu13/E/wzPCzTWyzidT/mHQIAhBe/3Np3SZTR1bGEVzgGR4J4n9p8A1khC8ZsKwJ63/Yy1liMBbrUu/myzrJUEhGzCbbeyvXRJpSEgjZuEHI6chzlIhIrx66XnMZEHJlY1sf+CEFGskbxw5wAv3wS+OShmPBbtkvwtOy9cpqHFBtZBSB9Yi9mJyMREdclzxzNQXYUzIDksYi3F/tt7CYaoqgd7dzefOXtXodS0CUDoihRjyG9hxm5WUQ7GjbEtGA3jREftYoL6Ty27TDCUGAtJqh7/fBk7H1zGRZ7I5CySNBH3pOPsucxlO6BaK0sIR6WnqD9lLE9hXEfJZgjD/OB0qQySfVUmC5kG1lYE02H+ZaC64b1yGsH1yxBkzjLZ6hSeM8K7w148G1jUrH4j154iac6aLyUYjHM0bTkyqoifQ9JGgt9molnFsxnfgIi0RivAy3gcehcwz9T5sCGMXZMBo5Yw+45JO40yzfZM4IBVeNKQv4fHUf+zRnkcEKeKWTbJGVYi8lQJdF8zMbk0C3/l0tX0MybZJ5fc72voYITNkgtbOCQmxkQKp3S9BxBidRM7vSntJ0AyUmdJaVMPv0fVzVhbqC9TJaLDdyuOmH6TPFELjK8GhxFWWXwS4++ib+mcI/gZtKADPrSngCnh2iTi6yZlFH+DHjaQTDR2ALw3xJUdzo4AboEeXJcR8kMj/GUT4PhyYTtOqyAbfodNvYsbWQyNDRiNUjTt9PjOShmcLjB4VSH2nm32ZqewFhC5MQSpCsRJq8F+beOnsMJrSB8W4F2S+aSgqGlJMG6EjJpEhUGY656BDz2M/PJEjtDMnLNeluT2Mo8QFHx+HudmOIGwIcIVNcsT4QQh2b2hSwQx0KuxXtCuZg1vGavm/p+m79Zv9URABdEdn6hYYissS8JYJyUtRoRK8m+kWFP02KyxCH4WUEe7j8FUmobrF+8L0K7hAncTbZAQyRiwEbQdfthG2rDlH50CpyflWS6iC1LDm8J4iTZzitSHxmIMW5x9dhuNIu56aqvAriCMR3rHDFuE1T+1Jk2S++RuwFUNMcrwMa78n7M6ureKK9pt9IfMAP2Azbjszwo7iKAT5Ya+roFTRniXJsPNLSaSlSWsgJhBQ3FrqvsIjUv X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR12MB9473.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(7416014)(366016)(1800799024);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: mr0a6ZkBwTwWIN4Lx1sAsIOWcobGzJEUfjau2OjYne9FvdwGiiYHM22E+Ca/cyJdpVcpBOxOt47Mohw7K7ywKhH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R9WD1az9+h2wwvwPSqKg6OMzSda47ehN7Vm+8Ntf3Ub1lbAzcgptmuRsFcJASxac+xwogh8caBVGMGJzvkbISC261mQbgOnXiHSnWVwwm6xKB/nSAf3fyNeyY/NxmJTP386OefJTVcHCLVqJcidUwdJklsVVbyGkPV10Foi2Nxw2RySJcH7JnYjql9TiU7II3SIpvhiFqMVfDObz1yxy/1eMyim9rjgA30kazC8SMUNbpW1caL2LOizCJ9ajyxedMITsA6TohKtpvDeOSeCyxNj3k3JaY2YOAl7+E8IG8p8ZqAxgz3hJCEyEOAMRH/l9x62biRHRounZlLaV1NVFwC43TefgKYjOxWorPiPn9tGZP2qQ6swOH8lW3wUsl9trrX7KcZieDR2YOIr8jvx8lXw9wKTwTEDHBnA30pKjKp9yXHDXXI X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: f12e5b71-44cd-47a4-72a1-08dd3672436b X-MS-Exchange-CrossTenant-AuthSource: DS7PR12MB9473.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jan 2025 21:10:54.2811 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: wsfY/K6+5DPNB6QjWp3xpL6o4MQU5T9op2I7WLu4bIXD8mFF+qlycRzkdZCEVCHx X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR12MB9232 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: D411E8000E X-Stat-Signature: hk3sfxrg5zbnpre5y53t5nkqew8f9sbr X-Rspam-User: X-HE-Tag: 1737061863-684926 X-HE-Meta: U2FsdGVkX19UXeI8lMc2djz6jvz9mtSKogRNpEEHMS5DcKd1XLE4Qo8Vvj4SVs+C7SeANJ1N+ScDy5pKWCD8Sd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OMAzpBSzniJI5T96uuOh7wyr+ito1izuAmJ3pF5u32W9iKlvfBP5Mwjb20qglzcZdbaft85DoxLqIRsg5NTqtUZGoNifV4LE9yyx/2+hJ75NFzNiNb6DT6nZFqvUbmkNb06p36CPgUjXJpUaIySx4/grKM6ixSi8qzN762mz3gW3kA/5wNSHrqhpoClYBcug+aPIUuds1C1iy9LSLsmx+iVc2s1KMCIow9LM= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
Buddy allocator like folio split
|
expand
|
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 3d3ebdc002d5..deb4e72daeb9 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -3299,7 +3299,7 @@ static void __split_huge_page(struct page *page, struct list_head *list, /* Some pages can be beyond EOF: drop them from page cache */ if (tail->index >= end) { if (shmem_mapping(folio->mapping)) - nr_dropped++; + nr_dropped += new_nr; else if (folio_test_clear_dirty(tail)) folio_account_cleaned(tail, inode_to_wb(folio->mapping->host)); @@ -3465,12 +3465,6 @@ int split_huge_page_to_list_to_order(struct page *page, struct list_head *list, return -EINVAL; } } else if (new_order) { - /* Split shmem folio to non-zero order not supported */ - if (shmem_mapping(folio->mapping)) { - VM_WARN_ONCE(1, - "Cannot split shmem folio to non-0 order"); - return -EINVAL; - } /* * No split if the file system does not support large folio. * Note that we might still have THPs in such mappings due to
Commit 4d684b5f92ba ("mm: shmem: add large folio support for tmpfs") has added large folio support to shmem. Remove the restriction in split_huge_page*(). Signed-off-by: Zi Yan <ziy@nvidia.com> --- mm/huge_memory.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)