Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp502593lqt; Thu, 6 Jun 2024 09:34:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV4EnLARjDnG742Xq01VJZc6e5UGxQXDQU4uDcBz9eu5y51NnblTzU39pJFN8Qp0TByWAnAIe+9GudcM/72t9H57WzajLyVRwYK6K50OQ== X-Google-Smtp-Source: AGHT+IEdBwtCf1Wa3gz8YkOgZSwjvWRL6fCpE3qY8nmenzuH7rCdGGGPGm38sGkmKZEPl1LxNuFG X-Received: by 2002:a05:6a20:748c:b0:1ad:9394:2d30 with SMTP id adf61e73a8af0-1b2f9bc2442mr58947637.37.1717691670893; Thu, 06 Jun 2024 09:34:30 -0700 (PDT) Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-6de20831a8esi1468535a12.18.2024.06.06.09.34.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 09:34:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204603-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=JqVMJ4Z5; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-204603-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204603-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 8762EB2E582 for ; Thu, 6 Jun 2024 15:47:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 19F5319883B; Thu, 6 Jun 2024 15:47:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="JqVMJ4Z5" Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2054.outbound.protection.outlook.com [40.107.237.54]) (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 5B2BC19750F; Thu, 6 Jun 2024 15:47:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.237.54 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717688839; cv=fail; b=eoqlTGTGeROzefyjrxcVuX4SocncWDUuyYpeGrUcn1WZAVEJjNSBmOrHL9GV7aAEgf8H3uy9QpiPEiicX44lWnr6m/UyAIDpkThEEHI8tgQAiaO+MqrPyHYWCaGoP8gwy2/wlvVKkqgHR55vdRZm1Mq5zBUQTXrRUz3T+Uw1siA= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717688839; c=relaxed/simple; bh=BWqbF8nTPOz+VN8Dh9mMUqIUVm3CFMTNzjbpjEJHCEU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=fhhMey6bxWWlsFMGoiQeMgKIqhv9wU7wnry+zoUW+KQ213VcloJuo8JfcN7DtRGkG8qNfEUnwrLCBniLCgjXiYox2yccBTp74+PCB5upjzCHb2BVj73/vUlA6GiXDsZobNcyy0KksPGC7nVW6aRKIpyUViRFLJHbn9OyghBFnlY= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=JqVMJ4Z5; arc=fail smtp.client-ip=40.107.237.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JbvKE6M4q8+GHUVr83vMM2F5A/5zwVDP+gJFz6qIFn9LCJFj6OSW4FJWabUQq1WMsH6ARd1Xx0HE2nF1Ir4JwHGLoQQPikWND1+VT9sBIg4rrx7l1PpEHDbDf23na+Vm7+bitElhgfiebH/MUCkDDGb2K/b3F9ERKM6ufnUvRGxLSNzum4XP0P33Djwf2Y3UUVvo+7YvrBOhX4mpH3f6Qj+DBdr9UOZ7/iMctt0oyVgrSUgpDPdvfaexM/SvxgkU8dNAP3NCP+NeXhlmeCtx+y1IDVxD1LZwtUlj5W/E0V02HXTeqai8IeKa3No0HVuoguf/yBQLIWZSh+m7j5Vlkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=RewaFLtv4QdHev3PzSC77exHoPdolEOk8JTtyK9/Odc=; b=ML6PqKfzDS0/gBsZ+DJqmpFvegMmPA3Va9FWAVwuCeUgUjunus0puVy06EiP6Qd2l1GogD6+VAVjEzkBt+lFCdyv7mLOg2Marh7p34MMHV5dk4cwbrmyQgX0zFGEA7O1C4DsbhvSs9xvscdwOg7F+W+rDMBpsM/xN3Soi3tQr3rKkyUYdlDJO5GmVSLNtGesR/TtZGOpNqnCf90uMaTlzlsAuzfxb3xTB7c9tFlRBKMeyEyUiX2582f/axkp8TVJxejON2mMU5iecJjLgdqSMYhT+zL8aa7Ywx/sAwtf/khL2Ixk2+1q5/9bu+A/1cbGhSMhKWUHVSOhUDAqSviiZA== 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=RewaFLtv4QdHev3PzSC77exHoPdolEOk8JTtyK9/Odc=; b=JqVMJ4Z5GyVQ71XpQjp50p4tX//HjFdsvdSUoX8ZxrwTRdXna3BgfEt2/qEy8QfCXWN0KZD/KgPxGQdamQTwdNiFEckJOGxY0BTCO5UYQOAKTQAGLDLX/GUX598+e9CJR2gUSCyBDPHK22hhKcE8L2faJtkO0glXCxPhMajDavry/wFcEnDuxTHw/hpB6JZfO/xFTuZE8xuR2PenVEds3/vlsB5JrLzIjBbQVESJrXbjhHCTVuBrDTANx3C9Viiy/qARWOuUd4kpGr2qywEt6eo5/eIW+tnvx0VJKikaB45/kwzQmBrM7KiD38/joN2T/0co6C4nBYjj2pSe3uxryQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from DS7PR12MB5744.namprd12.prod.outlook.com (2603:10b6:8:73::18) by MW4PR12MB7261.namprd12.prod.outlook.com (2603:10b6:303:229::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.35; Thu, 6 Jun 2024 15:47:13 +0000 Received: from DS7PR12MB5744.namprd12.prod.outlook.com ([fe80::f018:13a9:e165:6b7e]) by DS7PR12MB5744.namprd12.prod.outlook.com ([fe80::f018:13a9:e165:6b7e%4]) with mapi id 15.20.7633.021; Thu, 6 Jun 2024 15:47:13 +0000 From: Zi Yan To: "Pankaj Raghav (Samsung)" Cc: Shuah Khan , Andrew Morton , linux-mm@kvack.org, gost.dev@samsung.com, mcgrof@kernel.org, willy@infradead.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Pankaj Raghav Subject: Re: [PATCH v2] selftests/mm: use global variable to not optimize mmap read variable Date: Thu, 06 Jun 2024 08:47:08 -0700 X-Mailer: MailMate (1.14r6030) Message-ID: <744C4689-62F4-4565-988D-010824F4AB86@nvidia.com> In-Reply-To: <20240606154428.672643-1-kernel@pankajraghav.com> References: <20240606154428.672643-1-kernel@pankajraghav.com> Content-Type: multipart/signed; boundary="=_MailMate_1A98BCE4-F926-4E16-97A0-2C5DFDD51BEB_="; micalg=pgp-sha512; protocol="application/pgp-signature" X-ClientProxiedBy: BYAPR21CA0004.namprd21.prod.outlook.com (2603:10b6:a03:114::14) To DS7PR12MB5744.namprd12.prod.outlook.com (2603:10b6:8:73::18) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS7PR12MB5744:EE_|MW4PR12MB7261:EE_ X-MS-Office365-Filtering-Correlation-Id: 537fb452-baa4-473e-ef91-08dc863fef05 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|7416005|366007|376005; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?hNMIbkHv4LFySB5+dNWldDQW9+A/U4GzLPV/5uILd7cS7xtsQQfdNJcJoXqg?= =?us-ascii?Q?A/fZymP1yGktki4B1lH3G0zetC9V95s+NjiJPOg0jDvgvLnVEyjMWap0+fKu?= =?us-ascii?Q?Uua7kF2li5Wz9GpwOTkz/6PBh/6MufOBCMNgpHAgWA3oaZNysxjxS+a5uyr/?= =?us-ascii?Q?H1/+SaTFAC4Lq4K40o3YptfG9PtzheQNPg0ki0c+Brw9kMvab4VgrNlOB3O2?= =?us-ascii?Q?DnvSkMn6ry7skx9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xqfxK?= =?us-ascii?Q?b0cjilFY6TFqhF6VRQeqc42swJBr8zJ1vjMlzLjBepggVcqZmmFmcBPL2Slu?= =?us-ascii?Q?OFWxAXikjdGo9H1XuQMx1DSHE5t/qFV2MwPnNJRfMjG40sy4DEUw8FtLG3AM?= =?us-ascii?Q?Cw+t/x77ZILvxDFlIByGCc+NgfIUUjQdVzsg48FNLnn71Q7KDm5wU0FkKwqr?= =?us-ascii?Q?uOhJ53A8e+nkVuD0sVE9W3Fr?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR12MB5744.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(7416005)(366007)(376005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?Kx4Auz9Hr1D3n/aF5dfdaT2tHzyZ5CItqGPnR/24xvstCv+1D2ecT0CkMA/r?= =?us-ascii?Q?bXYXcV2TwvQJv64MAfe0wAvJe9g2NZ5a6eD3bI/3Rs4ZVjxq/3iKKsEcM3fT?= =?us-ascii?Q?Ogonq5EzNdDvhIv+mrBLVR415ioJYvYRR7yyXZZw32jNkqw2ffiGThimEtcQ?= =?us-ascii?Q?HH0/ft2C9sB+2sGTntjSi2yLrrJ21a3G0x8VO1qz8UYBdcHAX9mHNFtdv5a4?= =?us-ascii?Q?NGl+VHQnFdOtAT2l9VfW0OpVXvBRIT1N0dBkSYXfkPtsk5cDZj5dAs37Xofk?= =?us-ascii?Q?RC1ZZ831mhJJpYmhXx7wmGltVFceYvKUUAthFkq4wumk/DdW94cmjnthB7rh?= =?us-ascii?Q?RwPpcJdUIBC7yC7HaXQNjb3L31RC+3wlx7BXDC3KpSSC4SJMyRdK9QFDjyBE?= =?us-ascii?Q?IoyLjeKIrcci1idm5Nw79EGu60xH81jixhCs4bC59vt7ADbfpbn/WYcCQ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0Tuk83yOVCNiWGv8OP4VZqr7x7SG?= =?us-ascii?Q?xhv+/22uqYX1+NzTzvjbRfXjvcHMn+qdiKDsiruXBGajznKpO+eY9cwn0nZu?= =?us-ascii?Q?k+eP3/CpsXri60RaSCx5GX+1ZG/eTWplsrlBCaEvxE3h6hra0S8OHek7FTMM?= =?us-ascii?Q?OmJaDrL7qDKxruYSuhKolnhY2RBCXCxzTaT6gSAFfhnv73pm+n8aMh++adBa?= =?us-ascii?Q?rx2xxu+tluNKIwBTyu4=3D?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 537fb452-baa4-473e-ef91-08dc863fef05 X-MS-Exchange-CrossTenant-AuthSource: DS7PR12MB5744.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2024 15:47:13.2097 (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: fDn0kDBfLEz1bAhLWjEvgk55gFdWG22w2WCILWDndq1JWtX7xvRWQ5do5IRkvRix X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB7261 --=_MailMate_1A98BCE4-F926-4E16-97A0-2C5DFDD51BEB_= Content-Type: text/plain On 6 Jun 2024, at 8:44, Pankaj Raghav (Samsung) wrote: > From: Pankaj Raghav > > create_pagecache_thp_and_fd() in split_huge_page_test.c used the > variable dummy to perform mmap read. > > However, this test was skipped even on XFS which has large folio > support. The issue was compiler (gcc 13.2.0) was optimizing out the > dummy variable, therefore, not creating huge page in the page cache. > > Make it as a global variable to force the compiler not to optimize out > the loop where we read from the mmaped addr. > > Signed-off-by: Pankaj Raghav > --- > Changes since v1: > - Make the dummy variable as a global variable(willy). > > tools/testing/selftests/mm/split_huge_page_test.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > Reviewed-by: Zi Yan Thanks. Best Regards, Yan, Zi --=_MailMate_1A98BCE4-F926-4E16-97A0-2C5DFDD51BEB_= Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQJDBAEBCgAtFiEEh7yFAW3gwjwQ4C9anbJR82th+ooFAmZh2fwPHHppeUBudmlk aWEuY29tAAoJEJ2yUfNrYfqK3X8P/0cVGw5ksplTjZLQc/UzsKIiGw8yRt0JVX7b svcjBVXi8Ws1zyshjnwsyK9roLaoPheR7BE5DRcm3yRbsZrhgSAb3JkBK4Bf03Nm cdUr7TkE/TRe4cLontpGhPS57eWpiwK3pFk3EAawa9AhVCSwO+DR0btauRtEeRcG rXcpvAfeUixedDyHB+wPATtWI+CvRiuE0HYY2hq7leiBmYiDCt/WmQs/Kh3Y2zqm X84rK5mouAkkHrcJN6SmP3a7fWfzDH30rdxWnJnUe4wAz24gP9q+MMMZstY9PS89 cWoZx+E/HIQl4j/Mt/92Ww2ulf4pFQUALcQt1QiHvJGVP5xrgN4o3F1sYmu8N0AZ a+gusMlTa++1d8kmt/UgOcvbho+qluSS5LuC3ImHPmDFS8C0JAYD0aA+JEo3V7RK vOb5BT936jv3abTWdKv+CbNQqdGypzEBQL1eoly6XLA9J+zUPRhEmqqz6qXSTdVD zOFRaeiYqJt/1wEh65AIcntDdfLfHByTDxSPON0C5z2JdNuZxhOq6fhEhDOQEObO W8Gaksk5o/a8mXc7Phr/o3Wtsu0pRr+R0R9T6wG+nA3X5Ku3jKcUkbKF9mJG5bpg 9GhQbD6Gnh0qJWKROCq6ViBXvdxMKVE2L55jzBaA8bcBhX/pAfQqUKfo6foDIRuO T/466k2D =+DVO -----END PGP SIGNATURE----- --=_MailMate_1A98BCE4-F926-4E16-97A0-2C5DFDD51BEB_=--