From patchwork Thu Nov 21 18:52:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zi Yan X-Patchwork-Id: 13882302 Return-Path: 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 CB30CE64004 for ; Thu, 21 Nov 2024 18:56:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 49AF46B0082; Thu, 21 Nov 2024 13:56:06 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 448B26B0099; Thu, 21 Nov 2024 13:56:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2E9856B009A; Thu, 21 Nov 2024 13:56:06 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 103A36B0099 for ; Thu, 21 Nov 2024 13:56:06 -0500 (EST) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 86E4A1A14C3 for ; Thu, 21 Nov 2024 18:56:05 +0000 (UTC) X-FDA: 82811006586.29.683A32F Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2040.outbound.protection.outlook.com [40.107.223.40]) by imf28.hostedemail.com (Postfix) with ESMTP id 92D83C0003 for ; Thu, 21 Nov 2024 18:55:05 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=OAdKuTM1; dmarc=pass (policy=reject) header.from=nvidia.com; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf28.hostedemail.com: domain of ziy@nvidia.com designates 40.107.223.40 as permitted sender) smtp.mailfrom=ziy@nvidia.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1732215270; 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=7vfodItUcrcyLrOMU+QPVr1fQyMNwn6ddi+gcaz99x8=; b=lXD1uJ7kSq5FPD51nnPQLbuhHSV95lcOC+tDui7pFOcll81yWZ+7ZzvU1YLABPXPuJio/o wOuZxCfQdw9NlkmNXSK0vLUpnx22etIH0fDBpSqXxVcn4bwet5PMNw4xot654rONf+b/Oc 4ZcZ3aVX+bBBNzUUoFbfjcJZkUhM5es= ARC-Authentication-Results: i=2; imf28.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=OAdKuTM1; dmarc=pass (policy=reject) header.from=nvidia.com; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf28.hostedemail.com: domain of ziy@nvidia.com designates 40.107.223.40 as permitted sender) smtp.mailfrom=ziy@nvidia.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1732215270; a=rsa-sha256; cv=pass; b=1/h8k+pva9xCWUBQn49XQc3Mt4OKiV2WWxq8HxClfSe5jp4mvRHr+7uvt1CtLQY6HohOEP 5ul3dwtqhRKXGjN+vQGDp+nqGF0IWmqEm4uztkyLaePh1GSKH9kqtDhCyc21TtkoQP7mjV X+yNXJi0QsW/RgrWHK3L/l+0Ck9YvBM= ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=DFHo8moea7rlV4/8uZlcbNdEjHwR57YXRxfF+RtCGWOQlOGeEcdpJ4rY2EH2XHhKjHEXJv5lAkRg2eNhl2G76j7GBCl7AUMwkXUjX99BjuPcN9LnmXDMIY39VanpfMCM82lfiqpJpUhyGF8lDAj77PNwE0AFA62bxi8ZuNy+ogtL6XVvN4wDvHqdN7U4WYMxTwdgrO81/uhHPWLSaqTNReyAZBg68ylM6BZJ+TZLKrQGKFzfWseaXNLrEoc4QyGeRNJiAvwC3cX7s/M/Wwv6TLrnvQ2fo0zuGw9hkihC4KidV8idj/pCjSE5iLCWUlglGHfLr/q7RubryQns5ykfCw== 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=7vfodItUcrcyLrOMU+QPVr1fQyMNwn6ddi+gcaz99x8=; b=sVt4O3NoNqV3IY+VnRRuMNM5/TGte3foB9mw5cauoXH4ahwvJonR44TaOkSLqOLHhqFyhN80QQKXzHTy+r5Isva5Sm0Z+oZsFhkIPC75XCgjnXtOHYEa6K16kc7/Fg9P7kjfE1BpjSmoZ4iEXldS9TkyuStYCQH/8MPOWgjF9sa8umE9dXTQShV3FWbMECq5fyj7oJJVucUHMyfsbxFbtYPRZpKbFrm9G/u09H+CWXE3cPb7gqGH91EcQVcCrHhepO+wBJR1WoneNMEFqkgOn/6OH5PQvM090oId/RbhUcualaZW9Xd1q7mLsTuwWUpI8E2CbmMfQsgmIoJu0FN3+A== 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=7vfodItUcrcyLrOMU+QPVr1fQyMNwn6ddi+gcaz99x8=; b=OAdKuTM1Ig4jZxUJ69RH0ro9okn4s52IRcJw7+HaNeIXFLfooXlmUJmCRGWaQyBcDNTCaEcbccSxFjyverIj9q6t86jEi3ueQXBAvT+SJxbbTsCnMzQqEA9425yOhFas0WOElaJJfhptsuKclxoJzDStHfoIeTYh5WJX1X40zb2tVbnqX+Or9kOnEB6uvUucDsFNCtGNna6EuiQjAEY/KpWatoc4doDlyYcT2KAJUI8E3v61hd4PkFDMz7PFBhoyuWJIX6HB4oBm59p0yGwHgPJKBEdbHKIIqjzztsOrWrGHiq+8mfo1RZssrgB42qUq+b//uj+KYkrlXwUfOehILQ== Received: from BL4PR12MB9478.namprd12.prod.outlook.com (2603:10b6:208:58e::9) by MW6PR12MB8834.namprd12.prod.outlook.com (2603:10b6:303:23c::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.17; Thu, 21 Nov 2024 18:52:44 +0000 Received: from BL4PR12MB9478.namprd12.prod.outlook.com ([fe80::b90:212f:996:6eb9]) by BL4PR12MB9478.namprd12.prod.outlook.com ([fe80::b90:212f:996:6eb9%5]) with mapi id 15.20.8158.024; Thu, 21 Nov 2024 18:52:44 +0000 From: Zi Yan To: linux-mm@kvack.org, "Kirill A . Shutemov" , "Matthew Wilcox (Oracle)" Cc: Ryan Roberts , Hugh Dickins , David Hildenbrand , Yang Shi , Miaohe Lin , Kefeng Wang , Yu Zhao , John Hubbard , linux-kernel@vger.kernel.org, Zi Yan Subject: [PATCH v3 9/9] selftests/mm: add tests for folio_split(), buddy allocator like split. Date: Thu, 21 Nov 2024 13:52:20 -0500 Message-ID: <20241121185220.2271520-10-ziy@nvidia.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241121185220.2271520-1-ziy@nvidia.com> References: <20241121185220.2271520-1-ziy@nvidia.com> X-ClientProxiedBy: BL1PR13CA0216.namprd13.prod.outlook.com (2603:10b6:208:2bf::11) To BL4PR12MB9478.namprd12.prod.outlook.com (2603:10b6:208:58e::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL4PR12MB9478:EE_|MW6PR12MB8834:EE_ X-MS-Office365-Filtering-Correlation-Id: 0634ce88-ba82-4fd0-13c7-08dd0a5dad2e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: ao6xM8paWj8W1BV6BMlXhk3QhR/VThr8iEKeDACvc9Y7fOoBPjN2A2xfG6Px7mw//1i3mMpVEvRC48S1NBHGrCa1DyvjemfUPnNGSEkxZb/Vhscdb9ARX8ckRki5H2IWW+miJiyhvkAQC9VbmpLAMZuJM6E7BZJ4J40g7LHssvuTk8iWRdoKrlkMeqZTtkhSInBcQJJWTabZDW3kvzI7BxpTK7Xhi1FV/X+cGiZsTUbPIsbfxCOoHfgQTsAgmlrIbsC6vKUJFYH4dS57ICsa+4JpbOdmF6QHSvoptWHOElNZSK4IzNoyVZdPwkwaQ1u4ogkeWDOwwn/mLE0lkW2B8z80S1x728DyqvnhmeULoXnBtA1UPGk8Up8FgQYkyWJmaNrCtEjcYWsdoj+2sUw41Ujfps/8vtnmjgxlNVKoInzAwGSmZc7uqhWgje+29Q/gLRyBNBFVLgri+xQf0kMxAy9za9Xa6/HxDbzykji3pg+TfZztyeLeJV1l6FnIwlFZB8unuaORP9hZ6Re8HMT7OwhbGLXqcvgvQ1NobiS6lfVKXbA1TZzBuOTIqC2+pVMMTnM554A4slPPLjktX+rDg83cy+yG8eK9VEV/oZpr38PMoXDEFMdweFyx5MnSTefWbJJC57HQTaIebtOHvAihCEe3dfKO7ybiGXoZxpBl2XrtijBR3qFW8o575L3rD42CUf1Q7v6WmeCssIkhlj3bFSQKUgY/1itjZJin8algqvcIdTOrr0p2eDL0yJu0ETmoU6wAzxmAxbjYUv9je6cpAHZxNxCfyKTUxhDyCVI2apw423k+mz0ng4AuMfSGx0ZqJ72y6rys5NpT9XRfZK0I4q2cQLlBk+mrWhai1UWfsmTWjzwn/idXZYtUr/HAa5m/DYtZTh82Bi4jtd1ZP+4OVV7dH001va1t5MDk0VTyV3v6M5gB8HqCF1qf50eWUvnRLJTYX6Z6b6RUc6nwrLrR84N3zX0JJ/fo89Cyr87/oyNTKFbHOyHvV9Q2RCbrllZv7+Tp6ntMu/wAlS/0ylHKrzz9xHSWX1ctoe2unjXyr4qRom8klfPl3sHCSl31DruWDH78nBfjW+drshMnOja90GfTXU/P0SKzDgr3qwRG/nTO66n8+F9ev8gtH5Kp4TMNChV3Cql6TTHA3tRV4ge2c/vLvTV29lPz6sGU+DkGfGmKqW6arckT0QyadItX6KfcSqe9ENtnrOir9mf4b7FCNKuPEQuiiVKKN4H7ueidM7Qao6zyTgmyXkALj2xACtS3CFeyUFtXXXqpTlKhOqaeSzi35Cx2aSKJIyuObfMnliC22+rlsYJidiiKy3efv2Ip X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL4PR12MB9478.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(376014)(1800799024)(366016);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: S3AWpXHLvR8V8016XN5gZXJsu6xOaAvvlS5qjELxYLjsFR5JjRilojyEal2o+5UQ4O+fd4zTERhTPbm+/GBeblw5GOY6LtWtFNSttakcQL6rRWY5RhZFecK+y7umaC0BoyjhemVXulbzxmo4HACzunrhMKjLPIAAeDX/rPdi0L8zXCDLU5rZKQ7fr+zcgj8d0yAj5NbBN2QlQayRyYlg7nOdOY695Jaa0YNE4VJftJVEn5/97NpbLDRCJiCUis0Wrghx83slWFOOh/RcHWM6a6YneX1HtY3AunNmtuAetQDC478tlK2XVQc/FNKlODiYUt5ZAIttYom1U3NlcZuu/SeFsQ07C9Lkm8N47beyFGH1W7/dKS2blT/4MBlEmV7IVq718RCjF+YsMRbGq+QisWveWWr9kB4YxZvRKVtMsvG8FcgankrNKEZ/FzAMIqbH60EyDLS8wVX7kHqk1ZI98UIAlNwWgwR5H6ytz3tNPdKEUWoYU7xLHOAbqhG1m+n1bmBHb3mzXGTRqN+mmV4tMAUwRecyKIOIhJwm3+orC9b7OMYrIjJN3SFtzsRCWjaafra/xnuNYGzSObxqFi7bYdkh5d4tTI1jLpYreMU6+Pgxh9Z0fGj2xBMy7NAy3eKfYN/qOr7aBkB0S9eJJ0o0Fipiz5vYnmZ8FuY+6U0/CZSGnwOINqCt6KSiVm9ZZTLDLD2NQbPNpFBdgBZnRyfCwEH8ECSIuloAH3FHh+jbWrHyNuJbFkJOyj1mm4GaDCRc7NVi71UmWpZwzX5Qje8lVw1J+i3vLmvPjc2GmC+0MBNV4jxTjZPnINJEyRtK9Srx5aevlaxMWTs/dAXbroTk4OA67iloROqKX4RYCFYVNHy4h6CnqRZeG0i/r3f9LO05/W55qsSqkX9AZyLRVN8h6dHN4TBLOuvqbm9wFherbYXDLEWMWdhEVgYd5wXuXQOy2aof1mMgLjvBgXMFYVdi66WkvzgDrWWWyghzdnN5Ex6VkP0X8QzF9h927bXxMKboRmfgrLzts8H2VHyMPXdSuOZk6IJpLeHbeRVTh9GdSrD+jw6IOcWdUZqFR85dOC8tEW1CtqTOR41bXG5cp2GZ6SFulhBxip5O+cZ67w/0fBLI9LDcldXDLwa7giybLxU1tsyOQENKWGMM5UUTaVv/9yWrpoSAalmffRTiEEeFcXo1nw1zlRPkZKLjJELYUTO+BCpDMreOjEBQg9zJJ5Pnd3cdiTlSmg1HEYIJkcE+7KCrbF1/X0kXbpgWkB0/f0b+s/V29xu5WIk6vGf72BahIi0bv51YjgPwfdqtOmIncEo2N+tVLHn65e1wYP5xaR7nSkX9Fe18I36iSb1jDK8Kkcj42yh6FD4zqkBNBcO9qRI1Dp5TCWN9rfR8/85ESbHVv+v4fz6y6hHibCntBdqhNSejSUj9kCvSNFRB0MbTv/KKQb8chvGMB3YHuKZyT0zUG95nwEVqQJnqJYzSkr4gTFRuFRuzLFgSOHsBC+PVaxBdCcORQictG4/vmoxzPRxyndDSbk6t7yk/rBKSE3BHS8ZtO5HN8tLWddhYk3mbvnERYvc0aermuqDNP3HSEHE1 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0634ce88-ba82-4fd0-13c7-08dd0a5dad2e X-MS-Exchange-CrossTenant-AuthSource: BL4PR12MB9478.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Nov 2024 18:52:41.0986 (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: nQOjIULsQyyZeQzt+x8v5MCa/siBtpoh/RBWlZ+0crFxtyYE4wAd15VwwXj3/G6n X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW6PR12MB8834 X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 92D83C0003 X-Stat-Signature: zygtsii4n48egkmy1gdtq3z7bxwnoaip X-HE-Tag: 1732215305-143082 X-HE-Meta: U2FsdGVkX1//ew9twjRjVByqpXXlEQ3aZcRbw1gtJwDKiSG1W0xAAlQUCMrHB8H5sI/sNz8HRJgKQS+lyKtqYtLr0yIMzd0sZHXZZjH18z/SL74PRVM22TiLSddV7fVRtJt82yBJflYtLarzQK86VkeFmfvoIkD4ZEDt3bRHnZd93OZeXCtia/yr9jm8umSuNgrTlOw/9ALPNY9azDsmE0EpXP/tMDE3SRItoHCncCqKIKLZXS/VCKRv1WjNQHy97c4ruehI7yd+TF6TqsN5Dyrk2UkojMPrkMiZX2y1iG74tXZmGriWwe4yKSp/P+Scc2xxqcfUZyNKB3h83lvoNVETnJ28LfTT5HpSET6M41rh09sLHUFvf5p86JGcQrF+g5ae6BBM//409Ki/SWvhab+HNo/sraljMqv+Ynwe+i8d+kw7+wGf7YAkFmSheqdhJI6rmzd0y3yUwpONknU86Tu93CGncTLvx8hoiau2OqBQe8rQeaY3LbZvFJ2SRQ8FhQRubYLL6jfqulG/D78a22IAD4WF9gCoeUQsoUUNTfFrRQfbGqm7g1MIGsSUnAESsTk9ty0dZ+IGUcGUCd1+ZFWT1pt/YkVcTSZl2rmKzMP7fyyxqFoeUWkbZ+XNzqALPaFyVNzTtqUPUsVc4wHUDkk2smGrkHPzZ8aHEPRY3+2VGNVRL8hVry/dUWD0/WlDNd0demML162RSWLJ9+RLweFLsF4+iTojPDY6FGb04dCy1IwgAFWc1SqJE5uNzoZMWeoINvRAygB/7smZOpqCSa3/hLovEk47xEGew3SjgTJ+g5Y1pzhZjLackReIBK03pkbrB5M6kt3XAcZixyaVgIrETa290GhlUGYA+t83jO5UWw/gXVKgCeZe9swfdreGFCqKW59yeE9jVJvuVaTFUdB0qwu09BPEtlZHg+AAQ4Iryeg3Z3Vrfgsd74Yd+VSvvgLR2YMVxsRYfbr9BB2 jYcnJz8k Db5VzHi6OZVAc6Xmu9uceDtyNvGqr60DTiPrMP+ayuUGMqvHTkMscfYZnlmjMYqI50ckQb23UOJLdNP7a7GwlRmVmR77Y+A2i+EAjKfGt9uOD6hyH/pq/ZuGrIG0zGNb2SZvMcrHwARRaD8Vfr7NlB6j6V+6QpJzztKL/EuaDEdfNxrnibbRHBoGXj7bV9gUxZzWrJrGeaftKgkoOuQuvA593O2Rf5pgpsal3ydsKDRfZLjdqKccHBdTTNyEG5C7OJUVwowZRxC4hyUPTIJ64FGCVRGSt/urHll/fXjtsakk/1LxC6u8H29qwkgQKilx68phoTO8TzUrY4oOl9CcRcxa1RRKKnxFUIzk7KKIdeFt14vu7vKgmdYRnmw+0huIAHPJuplWoQ5bS+KY= 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: List-Subscribe: List-Unsubscribe: It splits page cache folios to orders from 0 to 8 at different in-folio offset. Signed-off-by: Zi Yan --- .../selftests/mm/split_huge_page_test.c | 29 ++++++++++++++----- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/tools/testing/selftests/mm/split_huge_page_test.c b/tools/testing/selftests/mm/split_huge_page_test.c index 5bb159ebc83d..1af8d6fa4465 100644 --- a/tools/testing/selftests/mm/split_huge_page_test.c +++ b/tools/testing/selftests/mm/split_huge_page_test.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -420,7 +421,8 @@ int create_pagecache_thp_and_fd(const char *testfile, size_t fd_size, int *fd, return -1; } -void split_thp_in_pagecache_to_order(size_t fd_size, int order, const char *fs_loc) +void split_thp_in_pagecache_to_order_at(size_t fd_size, const char *fs_loc, + int order, int offset) { int fd; char *addr; @@ -438,7 +440,12 @@ void split_thp_in_pagecache_to_order(size_t fd_size, int order, const char *fs_l return; err = 0; - write_debugfs(PID_FMT, getpid(), (uint64_t)addr, (uint64_t)addr + fd_size, order); + if (offset == -1) + write_debugfs(PID_FMT, getpid(), (uint64_t)addr, + (uint64_t)addr + fd_size, order); + else + write_debugfs(PID_FMT, getpid(), (uint64_t)addr, + (uint64_t)addr + fd_size, order, offset); for (i = 0; i < fd_size; i++) if (*(addr + i) != (char)i) { @@ -458,8 +465,8 @@ void split_thp_in_pagecache_to_order(size_t fd_size, int order, const char *fs_l close(fd); unlink(testfile); if (err) - ksft_exit_fail_msg("Split PMD-mapped pagecache folio to order %d failed\n", order); - ksft_test_result_pass("Split PMD-mapped pagecache folio to order %d passed\n", order); + ksft_exit_fail_msg("Split PMD-mapped pagecache folio to order %d at in-folio offset %d failed\n", order, offset); + ksft_test_result_pass("Split PMD-mapped pagecache folio to order %d at in-folio offset %d passed\n", order, offset); } int main(int argc, char **argv) @@ -470,6 +477,7 @@ int main(int argc, char **argv) char fs_loc_template[] = "/tmp/thp_fs_XXXXXX"; const char *fs_loc; bool created_tmp; + int offset; ksft_print_header(); @@ -481,7 +489,7 @@ int main(int argc, char **argv) if (argc > 1) optional_xfs_path = argv[1]; - ksft_set_plan(1+9+2+9); + ksft_set_plan(1+8+2+9+8*4+2); pagesize = getpagesize(); pageshift = ffs(pagesize) - 1; @@ -494,7 +502,8 @@ int main(int argc, char **argv) split_pmd_zero_pages(); for (i = 0; i < 9; i++) - split_pmd_thp_to_order(i); + if (i != 1) + split_pmd_thp_to_order(i); split_pte_mapped_thp(); split_file_backed_thp(); @@ -502,7 +511,13 @@ int main(int argc, char **argv) created_tmp = prepare_thp_fs(optional_xfs_path, fs_loc_template, &fs_loc); for (i = 8; i >= 0; i--) - split_thp_in_pagecache_to_order(fd_size, i, fs_loc); + split_thp_in_pagecache_to_order_at(fd_size, fs_loc, i, -1); + + for (i = 0; i < 9; i++) + for (offset = 0; + offset < pmd_pagesize / pagesize; + offset += MAX(pmd_pagesize / pagesize / 4, 1 << i)) + split_thp_in_pagecache_to_order_at(fd_size, fs_loc, i, offset); cleanup_thp_fs(fs_loc, created_tmp); ksft_finished();