From patchwork Thu Dec 5 00:18:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zi Yan X-Patchwork-Id: 13894605 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 8A154E7716F for ; Thu, 5 Dec 2024 00:19:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1F3096B0096; Wed, 4 Dec 2024 19:19:23 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1A32E6B0098; Wed, 4 Dec 2024 19:19:23 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 01CB66B0099; Wed, 4 Dec 2024 19:19:22 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id D58456B0096 for ; Wed, 4 Dec 2024 19:19:22 -0500 (EST) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 557D0AF04F for ; Thu, 5 Dec 2024 00:19:22 +0000 (UTC) X-FDA: 82858995702.22.B47C1DA Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2079.outbound.protection.outlook.com [40.107.243.79]) by imf13.hostedemail.com (Postfix) with ESMTP id 769AC2000D for ; Thu, 5 Dec 2024 00:19:03 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=PqyAdWMn; spf=pass (imf13.hostedemail.com: domain of ziy@nvidia.com designates 40.107.243.79 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=1733357943; 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=KjhhtdCfjFWJQh2NAguljjRu1svgJsAiws6cVR3IEslBsGu6C0MpAYp71wpYSW1rOq8Hfy 4z0IlWRM7mVIBqv0oNJhxDUV2RQQPkIbvJHR9TimXnJKSUuhbt63SGKCnqTymgFV/YVLqJ w3Cgwc4X4AjbOsUJj8ZtAOnbR6E7nFs= ARC-Authentication-Results: i=2; imf13.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=PqyAdWMn; spf=pass (imf13.hostedemail.com: domain of ziy@nvidia.com designates 40.107.243.79 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=1733357943; a=rsa-sha256; cv=pass; b=2XjCXgdF7DOQ8qevunimIl8z+111Atok1yPjnadg9Wd39j7BRmtxMwaopiDBmBWVd1E5uY 5AC547ZdUzr6mKZgPr9KsP21Q7Se4BI4mcoO1E02T7Yjbi8nro3HKyANGdBdZAoc9raTht Z8SStAW5nr3rcljlEmM0i0FaiMButn8= ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=hHNUzRVgwFg8A4RRgWviXnzlu+ZiI6wYj3P2+KdOgo4MjQwA6DKE46EN68lvrNLR0WFI/DKGQR0F1XoXHMI+gP1Pe3WT8ttzOHTZPbkJmeA0udt7TezeSpEALsIffb7gWaGAsdyC6NhkaaA1FTlluAwSPA735It/+Q/zRXOnF54pANvoerxMqL3znt9dgQcnYBq6fhhF6bQayjaepWA0/3mwlFAJigAauo3H4uJKubmtLNU21kKANNxx1z3xqOq+RQYswVDlMnZpa8OFTpU8rPdP/6cWiCgEwG7PSdkNufPSUdyy1MqBSlUqPk71lsXFuta/GuOyNzEyKgEzNL28UA== 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=pVUOiejGDBxT3abvIvFFUReqImlZaG4i/Xj8n3VInt3kn8Zsod7cFPO1x/BKgNTWuEwfnueeA5Wgz0brE41VzO56ZiHJ2biaPNQYgt37esWcGDPymPNsrBDwZHuz01jHRNR++li5i9jrSLaW6c/A6x21deTCrIkLs5ymXhPEhazqXihX+MKGkOMI5orwP0knmK5/p8hK8JvVQ8rcm3lNQCrZXfTDdQnEZnZBVyt0onI/lmW5cTEZ2ZJIUwFKZQzQd6uJAYQi+88BmyjQsNrTeKsS/optIWlJyZ/jz6Q1428Aeai8YZf/qd5C3J506y2O/jwFAwHYv2HGtAL7VXakmA== 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=PqyAdWMnljyW/pwUeOuZ7+3jjCNQWCKvDEoB/OaKaN4G+0+yhyzLH76jbf8vNReTYicbV732Cc5bsYGX+zLgkjXGv65VtNVwV0TKupaSMJnk2Pz0KRtpheuUvgfoJCP2nI858xDKtdIWpwkYX8E7/86rDkfCKIWO18xrPdkh6qXlPIm12Jg/4DeVjWzAgnCGQbVIh5WhcHAJxDY7Sq+Vxlhbt9/MDQVYBW8W6KzWCg3b0jJrbYH26TK6WYx3lM1bpbLpbAfjGexGaEr85svABG3w2zDd9S9EzJ6wg+cuvPxE0GB1ZPMaUnSRbUTaOMVp5astPdXI1rn3OSF9y0x8kQ== Received: from BL4PR12MB9478.namprd12.prod.outlook.com (2603:10b6:208:58e::9) by IA1PR12MB7589.namprd12.prod.outlook.com (2603:10b6:208:42b::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.12; Thu, 5 Dec 2024 00:18:53 +0000 Received: from BL4PR12MB9478.namprd12.prod.outlook.com ([fe80::b90:212f:996:6eb9]) by BL4PR12MB9478.namprd12.prod.outlook.com ([fe80::b90:212f:996:6eb9%6]) with mapi id 15.20.8230.010; Thu, 5 Dec 2024 00:18:53 +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 RESEND v3 9/9] selftests/mm: add tests for folio_split(), buddy allocator like split. Date: Wed, 4 Dec 2024 19:18:39 -0500 Message-ID: <20241205001839.2582020-10-ziy@nvidia.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241205001839.2582020-1-ziy@nvidia.com> References: <20241205001839.2582020-1-ziy@nvidia.com> X-ClientProxiedBy: BLAPR05CA0008.namprd05.prod.outlook.com (2603:10b6:208:36e::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_|IA1PR12MB7589:EE_ X-MS-Office365-Filtering-Correlation-Id: 02ab22a0-e71a-4537-e1b7-08dd14c266d2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|7416014|1800799024; X-Microsoft-Antispam-Message-Info: hViy2l2HHk7GFDeu19JPbjRzBLsxo06U+Hs0GZTs5+dEZtLxdtI1nRx8F17FjUNlItriPF6bVLLcsDM81mnYa5TF9S6ISh3SE39m8VwMQ3Us8hXfFjIabHkmErvYGCv7HNLgjiOTsPfnq28D9ZUK+Las/iE7AJTDOP+bG/orBTaUmeksYnIafZB1qnDIbTMPfi9wLKkljP/3DhkzKp5+xeUjTXtTbSpwDm4lcnob03j6khg90hvFXcNv0hAqPfeF4OIeA5d1DKVJZg3/YJ+wRTu+Wyu42xG5infkSz4SDLaZFdbRViAV7knUxQBLeK6oMMJJU8F70jMlsHHEjwb/QwDPzZAPFi/YQV/CT8mXKMN0nnrxlqvso66KmLyrHI+RqQJdB44yq4WxDZwsWn4uYRO5gQXHhaY9fjcSsrWevhDeOBZwxr5Yuy8EMoLXeCDGwX06ynN6NlsLG6UM8s6y3mXnPgLXnKSbcwhDAqJ9WEG5auENoLs8Xmq/n+JAc2cuI1rhPY6l0Kyyq06CadJ2sC0sGjBOx7X59Rx3hiHhQ5gVBPQ82Gnybnbu8Od44ZJQKtYNiuKi88XNDwlDaV2rRpcmTzIldI0n8aCGuO+JSVsiy7knUOXoVLaUjgNouw75mLaUAhizfNCGGMLa8vLVjsn5jOX3/7ussqEXpj2wyqxNrj9pQxB1+uNe8E9MAoZndcnRcUjFW5d4mTe0q4K37CShjubIs2y47voYsGIM9diDn2A/QYl+HECN5jpdHSXy7YdGtdG/dowrfgvd4d+UWPWfPQNMZR4+WNSJ3pjQKcGwHrImHlNBx/3+EQGXIFYVpJ5U4etI9eO4mrW+7IrR8YpvKdNgfavnKZ3T+gFzQM5mjpAOxzlm0+eeT3qj3dkGptAeM94UjtgsHVqzSNh5Ea9wWZGMaw+QnWqVFghOpnKJC6m+i/8yuLGqDO82anGn2u1afl9vlVrv2hFV8CxnxO5OC7IkqKsXOloLPUBuNElstMMRosBkW+6GZqw4JgJK4rmlv0EcdH5+dQlYAlb992tl3kyAh1MiG60wo60xiiFEW60SqHNHlJ5iIh6maRxGbVpYWDFOniB2jJYh2PqdAG28Ls9Pibs2Uo34QVh2MeKUh0Dy9T45WgYSQXbvIlSDnqsq5A8SjBWygCdMjpjphhdq2HBd8b9WWe0qdJTlvsZp0maW4cL+qDzOU1JlJTT0MTjK5Rql09OzawJMjAbEkdoFISz2BR0TIkIL882bYJ61zRS7Nl/V73zqdxpS4SY+iszkGF2CFKjYAGKKha+TOX8Z3jnXThFaaUelcGZK5hJWoVDJg9dxcszD4Ii4g5CeLmRWG0O9VgK7RxuYzPjWGg== 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)(366016)(376014)(7416014)(1800799024);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 2wQNE0WbdANjHio81QVMoE+EzdpQglpopbIPcLOVsjGGU4HPKBeIrr8Kd8pS9d61ydyqEkQEhe6siBoZdIY7QwtcoAyj49rtEXvugxnjiSlgUzD3iZmS2IMziJXQRYaeM608H1bmh2N1/rVORVNHI2yDIp9yi2sSQvfm7p2O2VNRJSAuJZCSq+PCGd+/nXSoVJFm06uxTMUNCO1aSbn986jo8Udg9hd4ucQ2r2dhzDmkR7kemULo13VIQy5ylR8u0n7QP0QzUJSTF2W6BRuibtGaq22j44u3BTexnDscpykBGZxJV40SoEiLOMzT606eLXG8rdbC+LPFWcU9ioV8nFbVPcfedhUpyB575L3V4RoE2cI/5t48JeQ97MrE65/zEhKMoYoHTeEi5qYpe4Sm3QFVM6tv+C1cAYfpbOUmiLpJq9qPp0XHI5ALMxgPgDN0Jh0dwsVYxrNklb6jqZJh2yKOhYdhLrpLnO25NTuOMIJiRbqLbnCB0A3oKRZeyPtqtKxWelx5BLPiZ8rZmLmCDmHOMF/GmNYqsgyLUhuux1OrfXWDqu2p8q4AfbnXo48MukQ5cfX9a1TJSCc6bBJ5Aiz/uRfwn/tKl8NprP4sD3oR6TJervQDNVKesIErCVKCcOCB5yMafJ7j19t3DJ6oWxvAoo01OoeJZtvK8H/Hjz8rFMfQQaSdfMD2DERNZdpr8sTYLP+8JhAaSsJOudcp2ZwnfH05yUGn8gDmklbjy59tUsiiAY1WLXAT+GVcYdjQMGwoCEicJ7aduEt1KFNOS/vkn4GKPorWHIQS4cfk8MEfd5x1ZUg/wrBuk9KnADyDDtbVII6r1AIW1xBmriRaKBi21fWILxkl636MCbtFFwg5OW5mKz+qFusmW/efTndzOXxbnpLsWKLynseJ1EHiVuKcbI4VzJp4CO4kfAQG//cVLoi9TJtXhbiAVimp78hGQRlMoaxaCyXBy5d3sxiD0vD37EqxvyNUWb8kyxUrD898appulatGJGEjiP8sc0Fs5q1ATNQScQcmm4tOY98QDBoG4mrJIQ93G+duhBZmGpy329nQtIvEEJHhxiNUK8KOlFw5hE3Wf6mOt3JiC/oeprgP9R+J+phHKDyNOMlCXzwb7gmNQUmsI9mu6+trwVaJH/Y+87/Ja1uV2L/gFWmFt2d8TtuAczB4ggpncRRW3EOfMG6RR+n0GVs0BhJYRSiFFDUe7W8BOP6V0d+2C2aV9dfY4UUHGEK2fYYdLL9318Q+MfZPlMBycRXOVN446aJsxZ9RdVitst87A73fkX9CMwIpNI8BZayjS/HBGyFivhVBKbkjBYSIQDSvBNWbKtj3VFdCkCdwCittwaD3q22SWPS2jLUUv9gMV967b0wolzSKRCJieBIThEXhVYn8zgWFp3wv56liZlxGngs9l/HCeQ9Bm3tug6nefC65c0LZF9hnwcDI0b5aLXKLgekBo10yqLw2vURJD7oiUvoufT5sN31qFxbgqmkbTfElupuhXRO7x01mvFdvux8J1Osu7JOEpX18HF/GX+j4+wP0ZpY21ZYH/kuqXmvC8hld7ICN79nkyd+L/yXNBZQeBLdU7+GK X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 02ab22a0-e71a-4537-e1b7-08dd14c266d2 X-MS-Exchange-CrossTenant-AuthSource: BL4PR12MB9478.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Dec 2024 00:18:53.8816 (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: a6nem3fB92JhKy0W1Zd6VXfj2/MxjMENbZoK3BbSQLTMM58MmqdmsD8sEHHHVUEj X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB7589 X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 769AC2000D X-Rspam-User: X-Stat-Signature: 37jucr65ifepgx3dd881zn33uspt1pu1 X-HE-Tag: 1733357943-708346 X-HE-Meta: U2FsdGVkX18yVcSb+3OXsvHaif2lsb54fdlkRdfGud+LptgBmQPvwupFVqeyzGFQtdiIw7LOAioKg2/wEdWL3fQZqK1VJ/pp2963cEYpsscgx5va4Sfadg68S4+WZs/EBDjCkp7kTTMmznYGYxzQ5kv8s/3jTbTa0KWF4DlUUkAUwge64Gug8SYOciRYqgV0l2P/0Jjxc08D4GIh1vgjrT0GPEKva9UJcMv5H6p+rMDXD8z+F21z7X+EQwqFAQU2Hzk3RIo4wxpVaxIhg+tQTWwNj1RWmFck1W0wZO/yN/t8bNG9CApARr68v5YzXU/MJEzzAOemPTxwARgfVmBD1Eh8PE7QRIit9bat+hWECJgesLDc5VEapCyc8hAy0XvWW8Utw0fUa2uzGUPI8Bs5khhDrcTymSwV0KLfNe22JZ8+Y05EHK3hFTg/2YwM6ryKqO/Cu/nlvxlpC7xhsO/2rw9J90SbJ0mlZzA9YN39vpEymb0A0vTQHo5DUkPudfgM37POYzpx/JWiV1oFSRCa/VvhFEe+o4jWAI8vrbOn9GZfGWXd2W/u3oY7FCxW7HTOT/6OJE/byTQShq4mavl94dVCUllBSzR69HDDcrmM6bgLygqkBcHZh5Jzi+O8UT37dTidZtU1mQk6c3U49CI0GOjpbz/PcC/nmDo3kFdxh+S28XgUMQfNLEdHgF8QqyLNNtK+Ww2mwrRqTzatczEamlYJvHuH1F10PPrAlgUWnb5k8VZSPYH0IX5PX8yHIYn7teOdWM+7oZATsT4jceQNFliApBb/5Ca6dvr06JhOzVfB5Jq2dq7y+VeMO6+Pa0g42TxADw+6Rgt2DGy4W4gx4nz/ehbNZ5AZRyBKYViAGZjF1UnLuYzrl7PEgD+wigIwMkNEhLQkDyzQ0Z4Tz6Xj4PhWnGIhBW/hVpvzx85ad3PzWOiGV0aTJZ2k7mIEYBk+cPwY7YqMhOV/qiTL+xw HAz6+FxN rxWJXKHp3zz+swWelYwYAIDa4X8Q+v9jadOmGyKzGiZGEHESEsM0hOzgTHPxIRgZdNQPJ6slQwg6p9y3U+6cAcVMkJYSz0Wi62L1CrjCDWfTWk10wuaq+buDwKu/1f233cU3HmfPn/Some6DvU8DkM5tetO3veyxPK9PJDvk0N817lSDnEIPH7MrT4AgSL3H52cx25HYYy9V9dsVZEip6PGrV3H8Pjbxg9xRiMy5ZcvQspnzfVQ8LTVwhQaWSlRwBOucC9NnwLGQvZ+Kn39LX+Ag4xQYoBQaM84DmtmVQ9rxnjO8zJVwqLxUM7jRLApId5s7EWGKg6tNvubjVkhsffHnCXfI4XtzCvoJTnIVBq0I/CcS1t20JYI86bWcwgyBMbrXFeL/jnaAAM6s= 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();