From patchwork Wed Jan 22 16:19:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zi Yan X-Patchwork-Id: 13947490 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 9019BC02181 for ; Wed, 22 Jan 2025 16:19:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0C999280004; Wed, 22 Jan 2025 11:19:40 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 07A28280001; Wed, 22 Jan 2025 11:19:40 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E1023280004; Wed, 22 Jan 2025 11:19:39 -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 C1179280001 for ; Wed, 22 Jan 2025 11:19:39 -0500 (EST) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 65F171203CD for ; Wed, 22 Jan 2025 16:19:39 +0000 (UTC) X-FDA: 83035598478.15.8EA9BE9 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2082.outbound.protection.outlook.com [40.107.220.82]) by imf08.hostedemail.com (Postfix) with ESMTP id 1522016002B for ; Wed, 22 Jan 2025 16:19:35 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b="Xde/uf2i"; spf=pass (imf08.hostedemail.com: domain of ziy@nvidia.com designates 40.107.220.82 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=1737562776; 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: references:dkim-signature; bh=g74+/hNiUySD6GLWFvbwSqao91HU4zXGsKDaR/w06aE=; b=wCYNOQZR4Dner2bofF0iIMfzuDuSRaejafD/LTBeHYgoNka7ow5PHxEr2DVgVAfvb1BmUY E+65IVbIPDwiswkV6iQoeD/e1SqBds6RbXcM6PgrLGyuVm89VuoJuMPH7+4Sj9F/kmCaN8 +t3fhexoJIVgKZ0+p+wP26qV+Lpwe/k= ARC-Authentication-Results: i=2; imf08.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b="Xde/uf2i"; spf=pass (imf08.hostedemail.com: domain of ziy@nvidia.com designates 40.107.220.82 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=1737562776; a=rsa-sha256; cv=pass; b=1R7t3aGCvVEIIOkFkSTO/4dLCkvX3J5ydApkmQjYH6R4DYmc7uCST9g1XBSViBfZCEGrI1 u4nwnDSltPzBhVWJM3BnfhsY6eJBMnmnmMnbjs5ek+G1w7y+n6+btwYlC+H4qteGigju5U ycYFeCbhkl8oz0xxgcj/Omle+rBhgow= ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=lBKJqcL/BQ03p8hJSjqNXZM8rRiqY4muy2s/Y59MpHMTawZYOPUXN+nGmIvPmVYYRZ2X5QCZzdbe/2ij82aJdwmIyqZjmjcKTTAD3wcoBKXivRY7jAjNyp6k/4T8nMECvOu1VqpXQBkymRrCaBVxFMdR1TLuNNLTYZFIL4lBo5V0TuQk9wDLOuM05RBTp7XtUgmYDyRnpeGgT6hysk4AA41LHOaPtHQlM6kGMrlZ78Xpgqxg2Lkuuy56l2M7PX+RWD4HCcfmz0WPNii0uYyEbiQ4S69dSp9XZnfZeWvsrHuR4o7TbIYe6JMeit5beq79bC0bTmTab/gbRMuxVXNxIA== 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=g74+/hNiUySD6GLWFvbwSqao91HU4zXGsKDaR/w06aE=; b=XYQFB4g6STVDO3VdScdEEFpJLFXvk8nm0J+GRlR0VWP3fRij/+zSoIDZNsTH9LrJYKt4biLU6+XetpKuEpC5UzEen258UVZGbdz2WpcLB3Z/g5/DBhUJGh+j9PyBxbtcdInqgB3ELQggmn6eAMIaCFK4r6rph8T5OfGJIbJqFZXASl0K93N5kJoaz5tL3ok1koleBiIzhCVcuCg12OphevyaTRS58P/iikhhC10hD8sVoeFsxxDlmYo5tn7hwvaICMQwauthYC7KTzoACr8bn7mRFFWvbMlk7Y9zuF4DMkRvKTLy21RRay8cbJ9dMqVI8lzBV3vnO0Ewlvi5v2h+dg== 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=g74+/hNiUySD6GLWFvbwSqao91HU4zXGsKDaR/w06aE=; b=Xde/uf2iOPRef4cz1SKOMGGBt5P/UrMi1yDhrMA+sVpW/waE/hAQkvCeB45Sj5Fcwd1wvJWchnVQKhfsTbcuKXB9boonVz2hFrP4yxB5fEUs3xeN7zob4qwfqbhCgKzZZNOGPDYmNTGk+XgvL570bLd4769KaAdT2o9VVfDyKIoVUgkftoLv4YVSmZH/EoIS16kaS3STIpoJcbj3ZyOm+PYgPPJrbE41VCaxahXkA7cXZu7W0e7aNYt192aR2aUWDFY+8k5bPgJjv0SnwVONBO8ziXWmj8l9xMZU0N9PoqbN0ewEekQ5fsWW1fhTPtWP2NhGlc2G2lep2lPQNMtJJg== Received: from DS7PR12MB9473.namprd12.prod.outlook.com (2603:10b6:8:252::5) by DM3PR12MB9326.namprd12.prod.outlook.com (2603:10b6:0:3d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.21; Wed, 22 Jan 2025 16:19:31 +0000 Received: from DS7PR12MB9473.namprd12.prod.outlook.com ([fe80::5189:ecec:d84a:133a]) by DS7PR12MB9473.namprd12.prod.outlook.com ([fe80::5189:ecec:d84a:133a%5]) with mapi id 15.20.8377.009; Wed, 22 Jan 2025 16:19:31 +0000 From: Zi Yan To: linux-mm@kvack.org, Andrew Morton , Baolin Wang , David Hildenbrand Cc: "Kirill A . Shutemov" , "Matthew Wilcox (Oracle)" , Ryan Roberts , Hugh Dickins , Yang Shi , Miaohe Lin , Kefeng Wang , Yu Zhao , John Hubbard , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Zi Yan Subject: [PATCH v2 1/3] selftests/mm: make file-backed THP split work by writing PMD size data Date: Wed, 22 Jan 2025 11:19:26 -0500 Message-ID: <20250122161928.1240637-1-ziy@nvidia.com> X-Mailer: git-send-email 2.45.2 X-ClientProxiedBy: BN9PR03CA0160.namprd03.prod.outlook.com (2603:10b6:408:f4::15) To DS7PR12MB9473.namprd12.prod.outlook.com (2603:10b6:8:252::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS7PR12MB9473:EE_|DM3PR12MB9326:EE_ X-MS-Office365-Filtering-Correlation-Id: f1d7fcb5-f860-4d72-8b44-08dd3b008d78 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|7416014; X-Microsoft-Antispam-Message-Info: PCu1cQsnlYcLsLVSesxoDKvLAVlZ//UIj13QSar0ry2cyO1nj2pWcALj9xUa6Ci2ra7/IW/aSN2I2zk8fgPTNO8F7iU/qX2nuT/YJV6lChdenTnMrpOPXqlui1qbQDysLD19qNyRT/UOB4z8ZFSly8NNEIcBRGwWwtV6eBQIsvOFHWuvzVw08w7Tm7Wc+5tD2uTWfFf+iCW7zo/jpe7IgurRBtYnkg/Sp0a5QPPktudC7LyI+GAoHBYkKt0KS9oIl98XCqqtksSLO1dT3dBg/kGk5IYZ8lupsqcbZGN/HKc01lsDSQmPV72zhMrYdaG5CR+x8NkYhRgARwkOk/dE7dw28duWq0RHAgcqabLQTEjnF5IRrxa+VrUDnIfPJb423RkrxsC9OVoPBC3+ssEka1CW8g4YUbBwJKfwLy3PuHmB7kU9TvHYMLdCg1EGhAcTPB/4ks30qs0R7GACIAFUH2FPbPkh2wzbY2C4UOeTzKPHa88MwuM4CVyWrVQKaEUu6h1QD0tEdDZGv2BQz3hRJj7Ni/G/3eAF0+2L8ZLjUwiGn4aW3TVh+c+xvjaVOWjQPiikySR2KSVHsEH/sJ4xm9i39QFfowtg7ZtjWFqk/2g0GmeVcm7vMMbOsq5FjlQAyuqWtV/z3JiaDVNx6XGXUc1KoiCtKmISY/jUKTt5LOtKMKIa9LNk0LuBidHCQIz9J2JIDU5yUxti4YzeAQEKPf+7M+c1JXakjWr5wUUETEVndKALGsZT2ZP76yHXnKNVyEFi/afjgZHbmYNu0atarUCdwi78mQvMYHuJjOxtcL5rvaSFqOkY6pMMIaCvdHN4sTvHceqL4PjZNSlyp46Ti09B1fXga0yupMJaryOHCmks9dwWQDtQkIF2HrUMzxWq6oTK0abkfuJN83TceM13d7d7840M49ZVQ1AD25TZync8/AY4eWvLzqe1ZKg3CL2zDxV81mbfmHwqiHzB4L64Tglsi1TV7ilL4SlWvrIPlm2bokfWgo5tZ3QVe/LqBGgi4DaW+E8zlUJ6P+PrsUqQQrvb/+ADVGQk8o6Yy784GT0vXlvacOKvuRvDKllTSQnfo3zyBw/cST4g6/psTPgFubK6kI2CgysbdfZHCzqZgit/XTYouLX4hZ7PUifB5FMDSlM7yK/XyVjzXLir8PQRQW0w3Zpk2d+JeQoJBdlDqfYRnjXMCisj6YFyWlp4Rf3DuCBzZBAFiSm1GJB7Ek2jXBWFGWOMo07ICZb9xIGegQyclmHVTSVm6s6lvbJQOePl7kBv/jow1rT7ESDunByzESfM7XT9WMPBPU8ilgR+81XBQmrZmL2uqBRLMqwr+e85ktSuqgZCx4pAUeGvWm/UmGqBsmum3WGmcGcHGznjFr5vFvUZFCKXyoEbl7DBASNb 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)(1800799024)(366016)(376014)(7416014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: jDln2aM6/pGYa31og/uWn0+jXKDv+wdxE+mmAu5AyXsGxmf4sJYV9GvrFjWNc7n63SaaC42LRk3uOdglajbsTSKkDtwp94v6PqZcgm0I7HdpJea5NNyyMvX1u+rllEY1bGt37eRkmiyje+6/lf5ZpJyqjkAXXEpACvrqWyNlfgdQWxsK+h8QVRHJQ/gKM97gmp3sixCx68K++R8352XGL8UhMNJWW53KnyuDtIlw7Z8dfFPOZ+njLu9125FqKJR5b8S1CAZqoSAs7PoYR0FiznRvCYnhuVwfg2asKjrPEChe2b0tuo7f1ukGrlGolCOgLPTc/mtO+HB0oKCeE7CEa0+sAGg9/kT6tNgmYhZjnYEeg2qeHnAF70ElLsRRBA8wXd6rM9pYJHW+S4nSH88/ZfYjWxa/U5ho8EMLBz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LNYReObki7XjHeAygSKqVbPbHj2x3r9UCna1nfI1v7H3zePvmalTRfiy0upZwZvVDp1fC2zFZqRTGXUJRkOFAvu7MAQ2BliU06EN97Gkl X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: f1d7fcb5-f860-4d72-8b44-08dd3b008d78 X-MS-Exchange-CrossTenant-AuthSource: DS7PR12MB9473.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jan 2025 16:19:31.7755 (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: 8m16wKQjCXxfjWusU6NlhPIhhWoK4Aw3OuDE0SzNWGmrzPk4O49iv/AwBU+Y8LAi X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR12MB9326 X-Rspamd-Queue-Id: 1522016002B X-Stat-Signature: 4d3xn15cw4npedkx6ghshhagtftqg71r X-Rspamd-Server: rspam08 X-Rspam-User: X-HE-Tag: 1737562775-196265 X-HE-Meta: U2FsdGVkX19JhkcIqGDRRBOWOBIVpCO4eShgjRnQAzZA/owPjcpFEv7+okvC4Drp6OBbNsm+6gAsqN6sNSWEsKHxiYmJ7Vg7sh1rrRACz9NHF1noaZqwBHAMjagauaLv+aNMpUS5eyizuuSAWCff10A7rmEIT7R9R8JFiKW9dBDm8e9a6rMh7jv7kVgcWQpO0NJ0/gEI75ejptzhkpXeyTnd70JPTt6WZffgMgc+L8ZjhWV/qoFP4R7aTuuqE/pDasL6AKaHN4e5JWwlrBBDjEokYffzdwtozE5YLXyzu7JpPxFtJ+4uaEnog83tbRRIVEcFDxa44tSTC/Crf/o7Bk+4gr+jya75PKczht3v192pUhjVhbieofchvSY/KjLDnHhyzD4u1OsKBpL13pN9avE+u1uXEwFslMDx7vFHjrL3Gtw5iFPff0Lo2sO4vtZCKhSf0AIFD9BQSBKhk/J2rgmxY5O1HB3bh+GmHKCv9ncJZiIylyBRJOTpoyAUdKBumDtlgqAyYCqoFj3k6SzCzrfjH0X/D5W4ByYK9B01JTXlBXXyZcVnvRE/ydOY3xyVIokvbZHd7QHQtjjCIjcUqTo0mKVz8M4xFfcw0lNf5TSM00djy60FTJpseT3ozoXLw7n+GDDnJ94RbvkYxfMOzu6yUC6Ye2Z3ll10nMVVaufkAyf3BRWN2/RDC5ULpP7ocCjSo2bavAvMST/zIRnKL2MEk+qaiXYiaBGMUCcHnk9B+m0vJ+KrIGftr6KAXdcWWPQW1btoB9hLZZ9R/Ayr/twOo/Jv2GjhY/k81unZjttX8L9tzXV+eMNFMBcNkpPdGwXU31ll3n05lkN1/Qp0NqjaR7SVYPfwSYcJfnAsYrZpaO7xHyZScl1FWtDFrPgAv9E2Qffvrebo3MzgVKpwi0SZaaPOcyxHXzHdWRyVLAbKFPs0wX0CIpMdsstJVatZpzrA75Z6+yKLNMh2FLU 0dgBniTs 2eaWIXZ8Ojuz1w/V6s+Z43Miuv1phvu40cbds8xjOoBvmvIEFhvtI6AM/SKeGVs2bSuMHNnpCH5w9zdpvm2425xNspYJTArt6SHewsNhe4da5TOknjAfYUt2jllIRjmZIggCGOfaxogh5N1plQ+dYKErj0G/NAsORSn36y86tG07lMsKmLeAxAg5MZjCv7huvNaDX4cJB930pTBhho/lKHRlXviOKXLTMLUw487/ipcfS5opOwAIWqQPBH84nV3+KIEYEYsn9O7DICZPwyE4GutyD7aEP78qbWOD64BaWvAcuHJuwWTnD8uZgd/Yn6ZLzeALFlGsk9TXxKKtZJ5Stj8Fi2w== 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: Commit acd7ccb284b8 ("mm: shmem: add large folio support for tmpfs") changes huge=always to allocate THP/mTHP based on write size and split_huge_page_test does not write PMD size data, so file-back THP is not created during the test. Fix it by writing PMD size data. Signed-off-by: Zi Yan --- V1 -> V2: write PMD size data instead of setting /sys/kernel/mm/transparent_hugepage/shmem_enabled to "force". .../selftests/mm/split_huge_page_test.c | 52 ++++++++++++++++--- 1 file changed, 44 insertions(+), 8 deletions(-) diff --git a/tools/testing/selftests/mm/split_huge_page_test.c b/tools/testing/selftests/mm/split_huge_page_test.c index 3f353f3d070f..ba498aaaf857 100644 --- a/tools/testing/selftests/mm/split_huge_page_test.c +++ b/tools/testing/selftests/mm/split_huge_page_test.c @@ -265,14 +265,28 @@ void split_file_backed_thp(void) { int status; int fd; - ssize_t num_written; char tmpfs_template[] = "/tmp/thp_split_XXXXXX"; const char *tmpfs_loc = mkdtemp(tmpfs_template); char testfile[INPUT_MAX]; + ssize_t num_written, num_read; + char *file_buf1, *file_buf2; uint64_t pgoff_start = 0, pgoff_end = 1024; + int i; ksft_print_msg("Please enable pr_debug in split_huge_pages_in_file() for more info.\n"); + file_buf1 = (char *)malloc(pmd_pagesize); + file_buf2 = (char *)malloc(pmd_pagesize); + + if (!file_buf1 || !file_buf2) { + ksft_print_msg("cannot allocate file buffers\n"); + goto out; + } + + for (i = 0; i < pmd_pagesize; i++) + file_buf1[i] = (char)i; + memset(file_buf2, 0, pmd_pagesize); + status = mount("tmpfs", tmpfs_loc, "tmpfs", 0, "huge=always,size=4m"); if (status) @@ -281,26 +295,45 @@ void split_file_backed_thp(void) status = snprintf(testfile, INPUT_MAX, "%s/thp_file", tmpfs_loc); if (status >= INPUT_MAX) { ksft_exit_fail_msg("Fail to create file-backed THP split testing file\n"); + goto cleanup; } - fd = open(testfile, O_CREAT|O_WRONLY, 0664); + fd = open(testfile, O_CREAT|O_RDWR, 0664); if (fd == -1) { ksft_perror("Cannot open testing file"); goto cleanup; } - /* write something to the file, so a file-backed THP can be allocated */ - num_written = write(fd, tmpfs_loc, strlen(tmpfs_loc) + 1); - close(fd); + /* write pmd size data to the file, so a file-backed THP can be allocated */ + num_written = write(fd, file_buf1, pmd_pagesize); - if (num_written < 1) { - ksft_perror("Fail to write data to testing file"); - goto cleanup; + if (num_written == -1 || num_written != pmd_pagesize) { + ksft_perror("Failed to write data to testing file"); + goto close_file; } /* split the file-backed THP */ write_debugfs(PATH_FMT, testfile, pgoff_start, pgoff_end, 0); + /* check file content after split */ + status = lseek(fd, 0, SEEK_SET); + if (status == -1) { + ksft_perror("Cannot lseek file"); + goto close_file; + } + + num_read = read(fd, file_buf2, num_written); + if (num_read == -1 || num_read != num_written) { + ksft_perror("Cannot read file content back"); + goto close_file; + } + + if (strncmp(file_buf1, file_buf2, pmd_pagesize) != 0) { + ksft_print_msg("File content changed\n"); + goto close_file; + } + + close(fd); status = unlink(testfile); if (status) { ksft_perror("Cannot remove testing file"); @@ -321,9 +354,12 @@ void split_file_backed_thp(void) ksft_test_result_pass("File-backed THP split test done\n"); return; +close_file: + close(fd); cleanup: umount(tmpfs_loc); rmdir(tmpfs_loc); +out: ksft_exit_fail_msg("Error occurred\n"); } From patchwork Wed Jan 22 16:19:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zi Yan X-Patchwork-Id: 13947492 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 58A36C02182 for ; Wed, 22 Jan 2025 16:21:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EAE296B0085; Wed, 22 Jan 2025 11:21:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E5D33280001; Wed, 22 Jan 2025 11:21:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CD7A76B008A; Wed, 22 Jan 2025 11:21:07 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id AFE4D6B0085 for ; Wed, 22 Jan 2025 11:21:07 -0500 (EST) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 2F975456C2 for ; Wed, 22 Jan 2025 16:21:07 +0000 (UTC) X-FDA: 83035602174.15.228A8CB Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2071.outbound.protection.outlook.com [40.107.223.71]) by imf23.hostedemail.com (Postfix) with ESMTP id 7D10D14000A for ; Wed, 22 Jan 2025 16:21:03 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=guwStwzC; dmarc=pass (policy=reject) header.from=nvidia.com; spf=pass (imf23.hostedemail.com: domain of ziy@nvidia.com designates 40.107.223.71 as permitted sender) smtp.mailfrom=ziy@nvidia.com; arc=pass ("microsoft.com:s=arcselector10001:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1737562863; a=rsa-sha256; cv=pass; b=DmsxudMc0uI7LT02nDxO7r/ZVbkmpt0tmI9k7pZA4yWvtCBTscEGCKZtgseIqbs77u7ukx XpT+Jbe4KcL3MkNmuTjkTbi+kLkjP3UuDg/ot2DF5HDXLYqs8XC3G8rXN1ZzG0c/sQJmQI kzdcxO2XMKHSRBRwierUFubqx9AaGZg= ARC-Authentication-Results: i=2; imf23.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=guwStwzC; dmarc=pass (policy=reject) header.from=nvidia.com; spf=pass (imf23.hostedemail.com: domain of ziy@nvidia.com designates 40.107.223.71 as permitted sender) smtp.mailfrom=ziy@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=1737562863; 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=WmKa+b07ci/+SigIR8tnvRx0W0zt+6m9eZpwmObzkqI=; b=KTQyQ5tGlFZbdMCZwyE+SkTipxM8ehJ12K0LVXSFKjt3IEDH5JKhcFjiAgyIvPXjcT+N0t 6NqscaYLDHLr2ZOsnIuF4YZZcb0kwhUQr95sgJc9WtbeJIE6qS9tawW1dqP1gK32MKgJEt NkwJb108/R5u4Yfc+mM+jzy03iR/Sjs= ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=onJKG0xX9DvCLeM8697EEecPq9TfdPmh+TzvPRVHVu/tsqj9MnXxhd1gogPmNfab1U2qPmQD3iB+qjeockMdvEgx61vrm/I/XHsEJtXWz/dixcChdsStlQyAjFMMAe2AUqNJ223/WoJB71iWIZqJd+X/pIleE+ZozSELh6G7ZLrJ50a/sr0noza6CQQl4zhNDAoluZhiSO/AUV2jHz6TwVJB2Bu/kerqGHXcY3eM95DCBdlUe8tP7t+33lSpIhEAJWkrb3BUa/JfrunwsNBb1MmOZgpmCSD68ImUGJSuuFxErrXIvOkUOZdvk0bfloyI/y7+hDuXy9qFG7azJnoIOA== 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=WmKa+b07ci/+SigIR8tnvRx0W0zt+6m9eZpwmObzkqI=; b=mgD3pCKtQTscV4wVLJdop/TvjB2ZsraTuZd0uEsnXhqkrRO90GXx2T9c7xhwbtJiMZ9swQ7fdseNf/TiyrpDlLaGSIUPkfn5NJDohRVxkQIQuOAGLQCTyT0DrymNFai5E35F3G6iN0nlHSrhAqrL95OUxlJrow6V32wHoI8TPDYuvJ/ux1cn8XEzoaCW7EVo52Jua0GRHljgjbdAMK2NCL/EaboCV9nNqVzArsBuaomhRhaoONDvjridCqcxSR1kTglFfjGjv9ThmKLiePqPgqIWYWCGNtM8LEFH4KCENbF59j+jl8dC6sEiuWnX9aqksKbMWbyAJ+X4A6gYeLQXdw== 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=WmKa+b07ci/+SigIR8tnvRx0W0zt+6m9eZpwmObzkqI=; b=guwStwzC9q95C/j+/KgS7aCntgmCd/xDvaWI2PlYRdL2hbsxmIaPpGGJuSFIXH6jjCnk9YZUCSe67bw3RPe6Scb8qbpzPF0gFs6hWT+p2w+tBNwBwtcIm8aL4NnvQY4cOBPpzDQ6zUENdCLbd3QU5mpczFF8dp18slcY4w5j6rlrlBthKKqYVREzmBj0uU9YX7vyPYKD92DdK0JVis88d52pyKMCeXyVK6zVioHq4syWsuieuteWTKeMZ42MSpTonDfneQluKLxmXRasWhAwtj/PCS5GFL8SuvTeS0N49d29dZhN1P2ObjgRYdBTFqmrNuuOCwAAmzgkX8bDTkg5Aw== Received: from DS7PR12MB9473.namprd12.prod.outlook.com (2603:10b6:8:252::5) by DM3PR12MB9326.namprd12.prod.outlook.com (2603:10b6:0:3d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.21; Wed, 22 Jan 2025 16:19:33 +0000 Received: from DS7PR12MB9473.namprd12.prod.outlook.com ([fe80::5189:ecec:d84a:133a]) by DS7PR12MB9473.namprd12.prod.outlook.com ([fe80::5189:ecec:d84a:133a%5]) with mapi id 15.20.8377.009; Wed, 22 Jan 2025 16:19:33 +0000 From: Zi Yan To: linux-mm@kvack.org, Andrew Morton , Baolin Wang , David Hildenbrand Cc: "Kirill A . Shutemov" , "Matthew Wilcox (Oracle)" , Ryan Roberts , Hugh Dickins , Yang Shi , Miaohe Lin , Kefeng Wang , Yu Zhao , John Hubbard , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Zi Yan Subject: [PATCH v2 2/3] mm/huge_memory: allow split shmem large folio to any lower order Date: Wed, 22 Jan 2025 11:19:27 -0500 Message-ID: <20250122161928.1240637-2-ziy@nvidia.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250122161928.1240637-1-ziy@nvidia.com> References: <20250122161928.1240637-1-ziy@nvidia.com> X-ClientProxiedBy: BN9PR03CA0156.namprd03.prod.outlook.com (2603:10b6:408:f4::11) To DS7PR12MB9473.namprd12.prod.outlook.com (2603:10b6:8:252::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS7PR12MB9473:EE_|DM3PR12MB9326:EE_ X-MS-Office365-Filtering-Correlation-Id: 124543df-84af-4eb7-6a58-08dd3b008e55 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|7416014; X-Microsoft-Antispam-Message-Info: MRfyAof0fFKmukAnGp3jS7Wlt1n5pQ4Dk1ssQA7wDKLw6bV/hOedUT+Md2p3FfR4a3AbQHG0vsoHuGmRG+uREn8YKN2CVtiRdHfuskVhXHucoxnI0EDIe2jYLm3zQ+kO3NHluzKRfbtnkH8GErOqKJcI9MfnR9Opg17Vc60dKjsL/eMuGxR1vrsa/oxQuxhgahh8wYyllhzY65+Zbg1pqyRDvcOhNt+lZEM66DVnl3pbxk7nvrWYsQMgvcKBRkCKCr/9uVWk1CouowzPRI7Xms4iE8oFXka7lI4H0AzBjoRnJPDVij3PcpWdr6+q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-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)(1800799024)(366016)(376014)(7416014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: yGwt8P3SPagBa+X9Yn8jlRqnMs3fh0MY2YTRvF6eymJwHpplhWdu4wmbdNaWCO6gILsP6tc5lxzWFFOkasu8om3CQHad+dBBmh1Jeo5IU4dLqk/s1RTOD1nGZ0A2w4Bm+4rEFdDbUA5q3MfwMp0ADag9kW7pGEEMhKffZYI/XNhAQl8PQzz8cvOqYEa+3s2U69nrGLctlpBHYkBZU5YxD9bkqMFkjqgCnhZ6q3UEaplw1Yg/EesHQIZeI37+5YKmIlmDv2hZUaPMxCoX77UpXuQKz3Dw7SVWlNtBr6P2vj+ZEwXkY0y3mTbr4nV7V3HJzCpbw2hhWZSP+Upa7UXoMZwe+88mtzGbaj7KACQ0FG0b09F4YzqFGsiCg2WXEkRzD9n9b63eZ2nY+R1oZz8GStNFqAnEql+WxG/oTAl/b2K9snK2mA6bi9QE+zeDOsXvloQDseiE9EGJvEFobwdd4sHI4qF+zI6I+zWzJC29hNMcbJ9SzwgP/lcGcGvbWl+VvM3NZWTi0b1k1Xqiy8OWtkHr9QBNRNEHpRryIKoL1QdfyglhcZxXVJtF0AvpyShX84ckRWe/qTRj+D1gi77EVrJTc3uYoY+uYFUu+AAGiETRNjdnK89Xz90Gye2+ukpoXbrcNFZIk0+54o652qxvRNvIJqxP32zUVWyyPPfncwcxk6fq71k+p8UJXIVjq76nkvGXQVvnNsAMZo8bi29b+3sZJBqaxTgfFEER8Bnm47JqtNSf4gW7mFG8i54nLvnKLMrNUGKSNTHpRKfNIpeYee/glJzHmR+vrbyCkxOrAiKu5w6FcdFTpcFqRPwvnAblCepB2JhAWnVjzdMhk3VAKeYQ0CDD5EoUClayz6Y17Yl9423GGPF86J37lsU/JdUVQpUsi2G4X2FwdnNyj7R53z/POYt/dY7j3V8qvIPGS730Y9QKwbQHjrp1H5kvj83t/UMDu3C1wxs/RV7Egb+GvSbEVC9lMLNZi3PyLGg9J3qSC+rvlw3AclxVbe2MGgZU2YutbI0E2R3vOerJTb+eDPHJURLlOc26+Pu5MHg4t11ekZV1wltS4WpYo5DRdLGm7OKUxKnfk0VNGMirS1bKwL2T2KDNHw769OnUV1UQSlEJzPARMe7Rneaj7zp2optsnSmPp0dWcHyjpM2dzU2p0G7/VJn7R4zDMtTZdLebKJ+Gh2LjlZzgoK0FPWHi/ih2ZqMJUwW2yzUoZAgdlbFnAH4dQeSjciW2SfFkZqL9Htc2mWu49IAvK7cqXWi5C0KW8TUNdSrr4sdpHv013iha6FCgP4f9kjdxrLp8AXVjkRS1Giekurnw29/PQ6BPIuDeuFCGvTvVO5RJmOvgg2zeP1du0K4nYctMkP5vhmwy+c8RzZ7cEOtXkoYXlJGe7SMfyZgH3K4PY+S8tj+eci2pSbvHKFglKfPh3Aw2NsB9FFFWMM0q7Ts/pA0HBMV6b/cHuKSC5eC2LRR/CVLKOCi6Sf9LBvNdVrfoB+3mB7p4ZjMJ25eZXoR8wfZH8V29uZCNVWO779UOA3LtCrq46BobVscLS5tjkUCmNgoMnoIpnShbarEXvLlBkILauqrYJ4kh X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 124543df-84af-4eb7-6a58-08dd3b008e55 X-MS-Exchange-CrossTenant-AuthSource: DS7PR12MB9473.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jan 2025 16:19:33.1648 (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: Eo+2RBiz3nKOSHV35t1E8NP6hbbkHBi8+7pp+vbt9Eazc+b5fWupkg8P+EcoQ2Xh X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR12MB9326 X-Rspam-User: X-Rspamd-Queue-Id: 7D10D14000A X-Rspamd-Server: rspam10 X-Stat-Signature: 7zz5ydqfibmbudxrstz3om4mo54111mm X-HE-Tag: 1737562863-25786 X-HE-Meta: U2FsdGVkX19eRj+2VUSY0kddtYrJVOF8l13p1wBcNk/9bk7IgPjZD85KlbfJ6C/64z+AuISZYRAydhtPAqIk0vT/R5yoxIG3ZH68aoy+ie9jIeAqr0aQEINvFUrZr1SIAZk/y1c5muLlP6D9Q3uRTwUTmGTki8WeeGTVgEOwLz9xk4njiDFj9p0vMWbrydzIgt8r9oJ2P+/KUyO+TtUR2D6UAoppaPUfAFl9Iisi4UgXMYVvBA0gP6p+cgDoyjlDH6cSf2RATrMRlOHY7H4U8WigGzrljAM16T+T+GsZ41UeqmDcnAvyGwdz0IGXirII16+LJ9G2VtXxfKV+r2Uh+J99ytuUFmRMRG2audaHDCcDf37bk95Am0zLW26oGENQnMtlXIcp7daG8euMqYQQA7t54WiG38BleEU+Ph67e4zKPEXxB2KSQwn+KdKpFvm1gY+zz3UrheGTzl5fdiV4iWHhfP3mKQvCHJpOP/ffjjtt8Er+5839Wvn3OA3UnQ/0m4yOPcIe2aI5YeHhSoCYhJ5lSG8XxU/iXQEGz2+//Tb+GwYnkz00fQakZv3hMnPn5OZ7L/gVtl8i8bhPfI6vpnunGTPW7lKDjYVn26Unfvy/gCdktnOMAwEDTZUGEb1tzCbIcPfnurxFZ5+PC2ZHATwwl0LKgWnAkTF0yWnekO26skvftsj3eYlEYXzC+njjl94mmDs2XypDPNU9RYpew3ZSCyseWbMnUE9VaWtp9rgg1RK/37hy55HA7Qfw3L+ywzS7O6p6B7AbL4auycqBw18CFIgV5sC2xluovROkXx0yjvFdK7v1yPKl/0xd58XZTMTMjbc6kVaQo1xNuaUCucbncrr6eedX+XpQkoTPgApREihL3z0UhxVovB9a+Ia9tcTlZ+VRQsybWIceuV2SR9VCPmi/SKNQK9o/rACdJK3WFATNIm4GDfPlTkpcr0USZ7srDypTvmE5tzGGTTl 5njknkuP 3gC/Dm7fp3y3p6ePAga/DTiZBFdpDIyoqUCcSLTDXYE+/bWFJs7/hAv8JsIhQiF0BWCmJYSGE4gJLJM4FPihlfz2sG77YJsOnrjs5lD9eBPXX19Oyc7iGgU3OQpdYiOByqDAgnek9gDUhUxACKisEBM29h7ZWnOVATxG29Grkv5ia6yUkQuTlLUjofFLeyArkYDwI5X3eVCgRxEZoZDIg7JeYBN/Z3JnicyFprBDei2el1VZVNnHMwZ+LUzOoAYq2IJwTrFObtOHScciHK3XYp53PraGlm2lWs5hz1FC6pGzEhNAvGwttNNnZhYThaTEqMc7jLZp3u6zmJkC2TtnJXteGAwHoHOdOdTSrIAU+o3SVjhLE+78I0AnRPzqxV3HkGcVkdLYaK/BdsSogInCtmfcIUaBfchw9VpIM 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: 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 Reviewed-by: Baolin Wang Reviewed-by: Yang Shi --- mm/huge_memory.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) 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 From patchwork Wed Jan 22 16:19:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zi Yan X-Patchwork-Id: 13947491 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 68C0CC02181 for ; Wed, 22 Jan 2025 16:20:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 006A8280005; Wed, 22 Jan 2025 11:20:05 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id EF96E280001; Wed, 22 Jan 2025 11:20:04 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D729D280005; Wed, 22 Jan 2025 11:20:04 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id B681E280001 for ; Wed, 22 Jan 2025 11:20:04 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 93D271A03FC for ; Wed, 22 Jan 2025 16:19:52 +0000 (UTC) X-FDA: 83035599024.02.914193E Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2085.outbound.protection.outlook.com [40.107.223.85]) by imf08.hostedemail.com (Postfix) with ESMTP id AECE4160007 for ; Wed, 22 Jan 2025 16:19:49 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=k9n63MOT; spf=pass (imf08.hostedemail.com: domain of ziy@nvidia.com designates 40.107.223.85 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=1737562789; 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=VF8d9XLiN6WC96xqKlYZ44y8IA4KQjYYKivV5ZwOitA=; b=lH4rPfuVoOLgKxmRPDPbhJHC8t/H+qa0wzt++wPTDqPGoqnSJvcN50XiRQd1A3doIRE1Nr 4kdquDMAV9OOa8b1MVapDEoo5x72pBsV3gEoKLJ52HUVn/gG2Le576blUMX3L7U4rRuEAW oz8JWlhS23WbhHqwpM69y+64Lf8kir4= ARC-Authentication-Results: i=2; imf08.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=k9n63MOT; spf=pass (imf08.hostedemail.com: domain of ziy@nvidia.com designates 40.107.223.85 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=1737562789; a=rsa-sha256; cv=pass; b=CBu3OaMP9x4HTOUsAGjhxbZ/j+TTS8xVov2axpX+qzmGfSfSh05LLoY6u1bM5cku2V6dfc k3QsYNG5oLH4VzpH+56u7wFB9qTvhj9Ij/qDaU5cuQL+vCrH2MGx2Nj/Rm5Gr/T6LLkXT4 yYb9z1942EJ92j8i0pUQFE4zSN1GDGU= ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=VxfoSmQJImtiuhY04JKlLjxX7agv6fE7oc9UTsWTMcG5P6aSExSap0R2+w2xHt/VHnoi1VBHATKyS43OWSaSJaae75FCiQGKMG9HSGp2mPY7G2J8Tbg8nFMME5HnFbnRQTyJPTP9K4yJ8o+OcMGZ/gtwX5D14kggBE2vVjxc5Pia1g9s+N0UW4IphF8yHKHZmMlvBrwGG0evPBAlCcpyam/vkj1wXMQzbE8UQ+DLdH59gs9N+cABv+S3uQ7mJH2NY/VsMXJgWleds/ByLePFvOFhVqFYUCqiuxegQHy9UbWQt7qLXR6wigkI/CByJrd8zNHbFXRFW4w0jI1H0RHwxQ== 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=VF8d9XLiN6WC96xqKlYZ44y8IA4KQjYYKivV5ZwOitA=; b=Onr8qd8KH0Fy8jcDJoYJdYV5Al+iCKOpu+eEOupnYryTUQF66rNLzX+bT7QU6L6mS2Dl3qcQWS/x7geKhP/j3b5YfC56UabHma6TBGR9iWh2+zoP1c0VDS9FZlWiGOR2pujMhvxTeSDKDdVrAuo3KLvN9bwhGlaSC8KPsKEMO1rB1P1ffBxN6bh9+qFFJOOzIKb/n7CnP82XcHv/cPazC76NJ7FDnNJjqw8QEp4A/5AZjV1GpelyfCvyVRNzsNLEXC2DuEtCK5fK1JYFgoc27ENYl/XGKPqYlpFjhj0ssu2e41jMuO2IsY4dYITsG9lfWh5zLLyyfUDkkTo/NJYUPA== 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=VF8d9XLiN6WC96xqKlYZ44y8IA4KQjYYKivV5ZwOitA=; b=k9n63MOTCgayl7UTdo5quUHKNxeeagrx5QFwUQVXziV/F+qgNzJMJrAgxHLybxTYVt6TvPUT/9x27XLoJk66LCT0nWEVcZYOXh2w1A9sR++Nsh7qJn6uFhy/k7Jnf1nRuH3GR3sYWWl7ZTAuR3EAfMJJ8cd6O09Fn5l/0zqtzuVs+C4DXBJmOz8Ba+97XmDieqC2dYF1x+f5RpaTkkIIwhtiUgi2wkNyOCROs8Nvl7J5h+poUJM/TB7yEV3XSY7jCGLs72StVSfoi896xe9ud+M0oSOVcxQsu0tYZmZq3C1ky/tDS/HjIgwMprSf6SIlpFu2IpGxcXa0sLgfqgAP5A== Received: from DS7PR12MB9473.namprd12.prod.outlook.com (2603:10b6:8:252::5) by DM3PR12MB9326.namprd12.prod.outlook.com (2603:10b6:0:3d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.21; Wed, 22 Jan 2025 16:19:34 +0000 Received: from DS7PR12MB9473.namprd12.prod.outlook.com ([fe80::5189:ecec:d84a:133a]) by DS7PR12MB9473.namprd12.prod.outlook.com ([fe80::5189:ecec:d84a:133a%5]) with mapi id 15.20.8377.009; Wed, 22 Jan 2025 16:19:34 +0000 From: Zi Yan To: linux-mm@kvack.org, Andrew Morton , Baolin Wang , David Hildenbrand Cc: "Kirill A . Shutemov" , "Matthew Wilcox (Oracle)" , Ryan Roberts , Hugh Dickins , Yang Shi , Miaohe Lin , Kefeng Wang , Yu Zhao , John Hubbard , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Zi Yan Subject: [PATCH v2 3/3] selftests/mm: test splitting file-backed THP to any lower order. Date: Wed, 22 Jan 2025 11:19:28 -0500 Message-ID: <20250122161928.1240637-3-ziy@nvidia.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250122161928.1240637-1-ziy@nvidia.com> References: <20250122161928.1240637-1-ziy@nvidia.com> X-ClientProxiedBy: BN9PR03CA0155.namprd03.prod.outlook.com (2603:10b6:408:f4::10) To DS7PR12MB9473.namprd12.prod.outlook.com (2603:10b6:8:252::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS7PR12MB9473:EE_|DM3PR12MB9326:EE_ X-MS-Office365-Filtering-Correlation-Id: 0a72387c-28cb-473b-defc-08dd3b008f50 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|7416014; X-Microsoft-Antispam-Message-Info: txK133kwY0fYSmg7aw9b2gLrMzPVEbBBB2L34zMxpNyJdSmK+Ahf5DJWGLIGUIdp6pwVYlLFZy1Q73i9hJySl6miBFwW7T4e19UxtbZCRNFlfi2jvEUqRlnPpts8MjdxpTU2sUCcXDyw9t/L6TOVFQ1V4PTsll9araJZcp/H95hFET1MX7xbj/yOT4NBjEVz2H9CJhxChg4vFhAiQ5mV9AlXCcOe5dAQmuh1Gy+2jsNrchocCq9P/Id50RpvLQvfPAOyDmpLU7LyPD2+lkfEnEO8EeXsNgOGn7JtUuyYLyr2PsRDtrFm9phXCHiyMdSH1tAv2GAbJ5kx9zQ7481lxeQb2zrKDMEIW/RK7rOrr0VOTqm0/ebYWCoiGXO5aEVj71/UGQeJQfYCeYXhfEhnY4wtcKM5XTfSI5/kZ6wTgo2le7TL8b0pZ2SUmSOc+YK8UGiXjHPW0QtZjkU54E2bC79XBOYdw9UQaxQnMB0oua7xmb7HUz6gACHDj3w9cabXlU1ZKR7gXG5aDXIGGIjVB3enpNbF04cRbE7UMxA/cgBeYhbNVHFqhWszMYifflSb95mSlf2V8doW4bQCuZuqUmk5VMEOSlmZ5pAOUanhauZOkNprsVyQGgBWWo3cTJxQTz2FZcQKZxYkeXGu8DVWDwae6qYxsXAtl+uNct3WwN4nDDA+iZ9k23XJegH9iIJ3FagCAoNChObJf8FCEQxaEQGp0ArHImiY1dA+Pb5DoT6XpFWw6om5ZcgPKH2Zqt7IY5ynzkMK7As9ZEeD4O1TrZFIsd86bsZ6WQEa0JkzVzL8EvsfQQuIGCkAASoxm5HJdV6D6JXElqqRo3jy2knuIrCyk0dc4xcYSOqzi87vISXnCf8IeafuWinJO80FfACCBEmqOK7m60s6ikhWzaYkY2Dal1HHFHDPeaDq0NZXrzb91M6GntCpYtW4rqlNIh15Pk+Qsf4czGCSbNq0E18p/LsjJ0jx2u13ZzLKzimlgXEDl7dYBjqivt1xIVXnpTqYdppRYGCvbvMd3ZlZ/dfw4ZaUNmT9UZ4iBgo3j7/uDsAA3M3J7cpR4aEsIwV/dcuDdnNbEQjm6UAFImQ4lI6gD4H1F0YnfKkQPhBvTXEXZTOZR9uxn9NWxh/JaaRX4PWBVgPufyo3DTUQE/xk2ThJHmLpkdxth6tXQkLwcDSweoyBNCH6+5STWyojEl9FBW2tl6JRKn4mvTaYdvP3pMq3ZgF+SoYZIhFTL5M7c7Z5dlsYITx3yGPNt0Jb+wv23aXv8BPENplnO8Dt6AKlYg3TtScQf/+Ms8rBGS+IFBmFoyrimhy83hUIBSX325Sq2gFCv/31wg6KMQT9nh8HGa3Zp7PdLrxDtrFAC9lynLKyg7Te25JzmKIXzantjk0W5x2v 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)(1800799024)(366016)(376014)(7416014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: CBEIpvsELwpic1eHLl/9DMe41nIrE/oYd5EVV5hFDQgmfDUnrufzmty9JueoLgHhjlDNSiahRlQfyPgzzhqDQvAh92bwJ/Y4mc+52U1ZKph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GqBj7VGbjwE8+IARWYS9nLeOiOj6tOgbuNB7f7bI0XRG68Nb9wd7Iz2S/Oy3Rim3OT4B/k4NvpxPR02LlbrLroY0iCMYYESJzlEPJjN/B9dxsiEolI3dIna3rv9QWW+L5XV5scfisBxzLghuJ4gsWnRuSapRhkgkf0Et8wAKfBzplkxLzVmA7ATLaBMk3RDqxKygYdQq5HHXQJFoZoSCgB4TOjUZZpmudHkTPVSydJh6JZjeAu22RDdEtRY7LLpI8vpTnEK/lhoG6nCKe81JP+qLMmTu0t2IBZE0/ArmS2gq6wiXA7IjoEoxvPscc+Q3JxCisZBVJjCjzZyvoiL48Kl2RdWfmRblOxUoj/+XKLKfNJFfwbEwx5+0g+jSTbxdP57R4O3Diqzk X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0a72387c-28cb-473b-defc-08dd3b008f50 X-MS-Exchange-CrossTenant-AuthSource: DS7PR12MB9473.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jan 2025 16:19:34.8230 (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: uXmrILx0BnkzQS/8I7Dzan155r1bPIdDfbXERq+6cOwXgjUoGM1m79B168z13kZG X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR12MB9326 X-Rspam-User: X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: AECE4160007 X-Stat-Signature: ooye6o755dk46nbw5fryfbmtcit719ua X-HE-Tag: 1737562789-528381 X-HE-Meta: U2FsdGVkX1+5wsQokx+NoTzxxw1oMLokqt0aDp2jGsrOr42q2KbCcSkDZLPlF+9XTDzzOajB7XGNua468jHzofewTymh3Vo34/olmnWQftXj4QStOdj3ZdRL1Tab6tcT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+xzD9OXdGaYPRgLdbXdzoiAUJ/y7s+2IUgoxqpNHO0d8G1D4VmmBYl8FmzfGHLLQKeSj8k4wo2sZyHx7fgnlgnkHyBMIvhxprdXo64yGuH++d/0vupWXA6zYhwtvXkH/DP0BmTCyW5rTLT2R7Jj/pLzo6Q3Qd3MgNzaMa2jrG+xOQ= 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: Now split_huge_page*() supports shmem THP split to any lower order. Test it. The test now reads file content out after split to check if the split corrupts the file data. Signed-off-by: Zi Yan Reviewed-by: Baolin Wang Tested-by: Baolin Wang --- tools/testing/selftests/mm/split_huge_page_test.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/testing/selftests/mm/split_huge_page_test.c b/tools/testing/selftests/mm/split_huge_page_test.c index ba498aaaf857..e0304046b1a0 100644 --- a/tools/testing/selftests/mm/split_huge_page_test.c +++ b/tools/testing/selftests/mm/split_huge_page_test.c @@ -261,7 +261,7 @@ void split_pte_mapped_thp(void) close(kpageflags_fd); } -void split_file_backed_thp(void) +void split_file_backed_thp(int order) { int status; int fd; @@ -313,7 +313,7 @@ void split_file_backed_thp(void) } /* split the file-backed THP */ - write_debugfs(PATH_FMT, testfile, pgoff_start, pgoff_end, 0); + write_debugfs(PATH_FMT, testfile, pgoff_start, pgoff_end, order); /* check file content after split */ status = lseek(fd, 0, SEEK_SET); @@ -351,7 +351,7 @@ void split_file_backed_thp(void) ksft_exit_fail_msg("cannot remove tmp dir: %s\n", strerror(errno)); ksft_print_msg("Please check dmesg for more information\n"); - ksft_test_result_pass("File-backed THP split test done\n"); + ksft_test_result_pass("File-backed THP split to order %d test done\n", order); return; close_file: @@ -517,7 +517,7 @@ int main(int argc, char **argv) if (argc > 1) optional_xfs_path = argv[1]; - ksft_set_plan(1+8+2+9); + ksft_set_plan(1+8+1+9+9); pagesize = getpagesize(); pageshift = ffs(pagesize) - 1; @@ -534,7 +534,8 @@ int main(int argc, char **argv) split_pmd_thp_to_order(i); split_pte_mapped_thp(); - split_file_backed_thp(); + for (i = 0; i < 9; i++) + split_file_backed_thp(i); created_tmp = prepare_thp_fs(optional_xfs_path, fs_loc_template, &fs_loc);