Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp671828lqt; Fri, 19 Apr 2024 07:15:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUqVNTOQ6H3EsDIb4YBM3lcBCyO6yf0gpDCjiMmok20g1N/fOMQA4a/avrrkugHStAtxP1uQapoV62W1cC+8FbydqsKPqmEEY8cyijWNw== X-Google-Smtp-Source: AGHT+IHsxdgQV5dNMAlle7Mg0mKvZYlov58mEIA0CYuo5CbDyPMspZs7Ao0qEn/44nXAc/cmdkvO X-Received: by 2002:a17:902:fe01:b0:1e5:d021:cf02 with SMTP id g1-20020a170902fe0100b001e5d021cf02mr1918589plj.36.1713536135547; Fri, 19 Apr 2024 07:15:35 -0700 (PDT) Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id b9-20020a170902d50900b001e28eeeca3asi3565720plg.58.2024.04.19.07.15.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 07:15:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-151535-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=SkDM0HaX; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-151535-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151535-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 0EE09B2237B for ; Fri, 19 Apr 2024 14:06:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9C95A12FB1B; Fri, 19 Apr 2024 14:03:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="SkDM0HaX" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) (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 37AEA12F5A9; Fri, 19 Apr 2024 14:03:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=192.198.163.14 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713535392; cv=fail; b=LMXPacL+DDtYPZG7tlXezK3JiKCBDsNGbx6MDEeFVKQ9TCtf5d9AvJuBhfgHzjQVO74QHAiiXUgAuTbDx7Q01wnahYMMovvgZe6jYhVTZ5ywg+G3ccK07d5fSPYFmYLSwsxvqhdsIUiEq+RNMga8Jkk6KhDnFSOi3/rWqO3Ns2A= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713535392; c=relaxed/simple; bh=a7FB073AmjBwgAgtK1jW3KYhAmx+o2vYK4ftJbZCqYc=; h=Message-ID:Date:Subject:To:CC:References:From:In-Reply-To: Content-Type:MIME-Version; b=qQObngOCqCIFemrhW2seoiWhep+/uEEC2W1aYZVN1xkJkusKtgBzLeRCxREnMvDlmc5UlddNmJj2VIktAZcNjN888+n0z3Z1e76DvU3qRXQxPa0ZIrBuNEl0kh4k4RnoKpWWC9CFyvDt8uSjbGQO5FwxK06TBnjM1FXnVw/LeiE= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=SkDM0HaX; arc=fail smtp.client-ip=192.198.163.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1713535388; x=1745071388; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=a7FB073AmjBwgAgtK1jW3KYhAmx+o2vYK4ftJbZCqYc=; b=SkDM0HaX5q7PxOuctV/2EFnT1BOPr4uu1T5Wqh37VgfEX62dt4zzfGFY dx+s4WaRXOKMPEa8SWG5KbXZw7OWdT005qT2MrpOOBVAaDm2BMlLLIgji m631RWNxhzAIdO5Mt1DMAqCMz9okmQUWf8h7CoEZLnB6niIGWz/e8O51r a5/72mTqh2asdrFBMId/bAd9SECc30utXGYox9eNWZal98IKoEE0bN1fx MRAD6ceBBblHEvxDlsaaJwLiX4Odk4ChniC1w8KJsq0WQmso9eTk37Hxv aKdNO1YFGvsHPjolph+kXpMxbb936QCYTC7YMGkbjwArtBtYIuInm0Xh8 A==; X-CSE-ConnectionGUID: C3bxsIijQ8+ZBKsRk6T3CA== X-CSE-MsgGUID: VmplemxbSKaYUtHfcFlNzw== X-IronPort-AV: E=McAfee;i="6600,9927,11049"; a="9358300" X-IronPort-AV: E=Sophos;i="6.07,213,1708416000"; d="scan'208";a="9358300" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2024 07:03:05 -0700 X-CSE-ConnectionGUID: wAXzw8GjQE+FD6izcyZ4Dw== X-CSE-MsgGUID: /8UWTVQlTE23R489u/lxBg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,213,1708416000"; d="scan'208";a="27990943" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orviesa003.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 19 Apr 2024 07:03:05 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 19 Apr 2024 07:03:04 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 19 Apr 2024 07:02:15 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Fri, 19 Apr 2024 07:02:15 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.100) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 19 Apr 2024 07:02:13 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aZIXn0vhHcm08nDe9V0DbYp92HSSZ5kOgw14mjRfMmQlzGnKkZQAg7AAM9okKYEoiokNNGubyKs+g/abGbvIgKpSmHM87fjde2peDJX+w9fYfUELLCj+4eXeDB4IyHtdlqnZ/rKCW9jc1pCaNPJdBh1d+XxqPR7Q2cwnc5VqOCYIg9UKwTD99s/h39be4XGfxRzlNVCmacVMC1wUs9tTA6szSThCOqrnv9LNi/fza9PVvZ6QaBOCgb72gWu0Sf+CWpEWDe3pQDdQZYCnRA/jex6kW/31cQGoIVwuiFKdfUMFhgji954j9gCU9kTD3a2jkw4FS1yJw9eD89oVraCmQQ== 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=41zSAAfISOyzsIhe6GBTpK5KKU92QhCfoVu8YJblsDg=; b=DnORyY9VxBRLg5DXPkqXFW4Syhmi64OSRvduHfmZRCjl7ouMjglC82ypMEgBBqiUb04WOeGbYQl8e01Wpw01bHhi4bKq5OQkeXMoFae011+uCYJFQw9UAeIUSzstCJN/O1eaGZ44ygL7MCDjGtCATleYfyLsdPcoKHBUStlbQeywzx8uy8ktE5/OJVK+HtDQlScuDnASiufcD8LSXPbsvGNvrCxTVl2HqJBbeYJBP1r2EhykoJYtdf/c3T8F/jOCAz++0DT+9YVwdSb1KWHqIpE4HEykhMs2lp0h9CP5jnNGb1MeT2wn5awtUzcqfQ0PYr6BiTJtTW96EI6RmuxJXg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from CO1PR11MB4820.namprd11.prod.outlook.com (2603:10b6:303:6f::8) by PH8PR11MB6730.namprd11.prod.outlook.com (2603:10b6:510:1c6::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.14; Fri, 19 Apr 2024 14:01:59 +0000 Received: from CO1PR11MB4820.namprd11.prod.outlook.com ([fe80::65ce:9835:2c02:b61b]) by CO1PR11MB4820.namprd11.prod.outlook.com ([fe80::65ce:9835:2c02:b61b%7]) with mapi id 15.20.7472.025; Fri, 19 Apr 2024 14:01:59 +0000 Message-ID: <852918ac-31a9-4924-a551-8b91de91b0e4@intel.com> Date: Fri, 19 Apr 2024 22:01:47 +0800 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 02/18] mm/rmap: always inline anon/file rmap duplication of a single PTE To: David Hildenbrand , CC: , , , , , , Andrew Morton , "Matthew Wilcox (Oracle)" , Peter Xu , Ryan Roberts , Yang Shi , Zi Yan , Jonathan Corbet , Hugh Dickins , Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz , Chris Zankel , Max Filippov , "Muchun Song" , Miaohe Lin , "Naoya Horiguchi" , Richard Chang References: <20240409192301.907377-1-david@redhat.com> <20240409192301.907377-3-david@redhat.com> Content-Language: en-US From: "Yin, Fengwei" In-Reply-To: <20240409192301.907377-3-david@redhat.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SI2PR06CA0013.apcprd06.prod.outlook.com (2603:1096:4:186::18) To CO1PR11MB4820.namprd11.prod.outlook.com (2603:10b6:303:6f::8) 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: CO1PR11MB4820:EE_|PH8PR11MB6730:EE_ X-MS-Office365-Filtering-Correlation-Id: fb88c039-2d90-4c9a-ef4f-08dc607947dd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|7416005|1800799015|366007; X-Microsoft-Antispam-Message-Info: qWcIe6v1u0PkhgxddH690cnaxomX7sXCeWzQAvYmsxICATZumsdOZThA/59fSQUxcejQmJcXeoj3bl8irMnY/Aq3Ry/PEkh2Y1eJVCN2F89EqAEsOvQpyAOMME4934ntZTe2Kj05JOdKBZ2LNNq0i+JaS8J455pYgrea9EaH1802WUS/q9ni3hZnW/kuDoPVYRisp7F+hVX9zguNhHPuhWZqeE5NeqBlqzR3/lly1Daz2YKRNuQaR9wQf9cWfBf+s6vydXSkMV/SKgDLx3IGXzU9wAxDUZxzla01i/1uMBvgUoo8KqzA9qy46gsaemCTYv0HiZYoO3eQeSrEpol9k2JHV6a+MnKCnOwipQ35kC1X2tTbcDBdcPWdK13+hnEuQ9qDOjpuyT5NhvoDMh/GYah0tAUpl39djPehSk2VOHrMMJ0383Vrn+9tCy9gRi8Lrliuz5BmMNn897+gIAp53Mu2QpKrPLx+hXjX9QuTL/F2mE65SmcYuk2CEl3X0sqOaWWYS5diFN3NhaOjFZQg77oL8mlbyghNOTu+v4kRw5ltIrWRgQ566Ot668qnAP4WabemFeQCXNLgBGsKy5BfF7hYzqDuMD7BKfaurSzaD+zaP4XjRHX7VFVs7BhJq3CN/eScVh1yzKEkGu6eMMMCoObJBoU6F7WltomMkg+1Teo= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO1PR11MB4820.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(7416005)(1800799015)(366007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SWpHYjRpbjNYVGF5RUFrSWVwLzl6UDk4amxQNzR1aWJMSTdqR3FKbXFBYXNh?= =?utf-8?B?UENwNHBTRTRNSkJVOWtUUFRVV0VtdDVvRDI5cmhZREdSS0F6eGpUbFQwSHVm?= =?utf-8?B?TWltSG9tR2VJY2xVWXhVdkpqamkyZXVGRUo1T1dLNFVXN1o1VktCakZiQTdD?= =?utf-8?B?S2h6a2dCYmxHSGVIN1BVYXR3VVN5dDdOU2x0U2ZhMHFxQTY5OFEyaEluRjZP?= =?utf-8?B?TWEyelFVWDBFSEZFN3g2aS9xWHJjeUszeXZnUkJhR2dCZEMxNnJyZ2NEVkYr?= =?utf-8?B?UVhMbWtsYm9KeEpwU2R6M0p1ZzE1cFFyTXl1ZHhXQUphQXJDZS9sV0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tZS1Q3M0hlbkdK?= =?utf-8?B?cnc9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: fb88c039-2d90-4c9a-ef4f-08dc607947dd X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB4820.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Apr 2024 14:01:59.5471 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: rs3ePm46BdHvVcenJPebi/WbaaHzDrl6IKabEmZznFFzC8uZgO/cFj20RZGnnwMsMkRwYi0A4ESCUAfIU20/ew== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR11MB6730 X-OriginatorOrg: intel.com On 4/10/2024 3:22 AM, David Hildenbrand wrote: > As we grow the code, the compiler might make stupid decisions and > unnecessarily degrade fork() performance. Let's make sure to always inline > functions that operate on a single PTE so the compiler will always > optimize out the loop and avoid a function call. > > This is a preparation for maintining a total mapcount for large folios. > > Signed-off-by: David Hildenbrand Reviewed-by: Yin Fengwei