From mboxrd@z Thu Jan 1 00:00:00 1970 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 C9F9BCDB47E for ; Wed, 18 Oct 2023 08:22:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5C1C58D0145; Wed, 18 Oct 2023 04:22:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 571AF8D0016; Wed, 18 Oct 2023 04:22:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3EBC48D0145; Wed, 18 Oct 2023 04:22:34 -0400 (EDT) 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 2D9A98D0016 for ; Wed, 18 Oct 2023 04:22:34 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 030A1C0195 for ; Wed, 18 Oct 2023 08:22:33 +0000 (UTC) X-FDA: 81357890628.20.07212A6 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by imf07.hostedemail.com (Postfix) with ESMTP id 0E7C04001F for ; Wed, 18 Oct 2023 08:22:29 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=Xyi8pwzE; dmarc=pass (policy=none) header.from=intel.com; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); spf=pass (imf07.hostedemail.com: domain of oliver.sang@intel.com designates 134.134.136.65 as permitted sender) smtp.mailfrom=oliver.sang@intel.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1697617350; 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=tmXAnCuaXGrX4SY305m5imab1ILBl7jSnDsDzLQjZ2U=; b=lB+Uji2b/AucBBXPFxF217OQwxqTUhHoHQJ8qpuNUGV6WqcRx8AEzH24coZOBt83TJi+3e mRSr8766qpkHr5obsdIB+JdcZpqDwgjfNWEA7g3wBWYn26eKI0KHyilkxMFm2yoBm2IKE5 FFtfMLwaM/fBjapBvroNf4RzfFrbiYE= ARC-Authentication-Results: i=2; imf07.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=Xyi8pwzE; dmarc=pass (policy=none) header.from=intel.com; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); spf=pass (imf07.hostedemail.com: domain of oliver.sang@intel.com designates 134.134.136.65 as permitted sender) smtp.mailfrom=oliver.sang@intel.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1697617350; a=rsa-sha256; cv=fail; b=A0g6sTMRmbY5/E/grurlRhvNcuPQtj6jCe6Y5aNKKCLGjkmUhbzMMCLgBhToaXAV5kI8Ud a8YroFx7U1y5EvZoXgDm0SZbCvuYX2IGudheniEccP96GoOLjb8D/u6BBqOrw3Jm9Oi1Jc EIoFZ8OqrLG/X42jFK3qsFUfFVkaDhw= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697617350; x=1729153350; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=10qQzT8Z4OMC89mazo6hvethrMO9wp7k+HYsOTYvnSw=; b=Xyi8pwzENpKrJuBsbMqDKkL9zovZSVgFAADXakJXyU02leJhZqD/VEnS ipTreN0Ut8CfAxWdgTpdCv3gl9iSA2Tc2WEFf7Jsv0UO1yiNu6bKn2vXe dPbfO0K/ZTf6qUvTPHTxuLyVAXSJTPzrRMyko3XPXMacuCfpM2Jh5XhJT ag8ZFvU7Jt4qGD0XGY7Zqjk5b7QZzFYp5iepsAN5bAbaBNTlUgOixpRgy 31h8GewNPxyS0ozf/6DZu9Cn8K41n2h9+ngnPTQuJl4CkDk7WTA/+65hH pUqpZXtv3SP7FM3cpKXv7BlCZMKvZOpmvxv3EsKBUKDgTfkN89JMb1oGn A==; X-IronPort-AV: E=McAfee;i="6600,9927,10866"; a="389841481" X-IronPort-AV: E=Sophos;i="6.03,234,1694761200"; d="scan'208";a="389841481" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Oct 2023 01:22:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10866"; a="880136709" X-IronPort-AV: E=Sophos;i="6.03,234,1694761200"; d="scan'208";a="880136709" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga004.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 18 Oct 2023 01:22:24 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Wed, 18 Oct 2023 01:22:24 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Wed, 18 Oct 2023 01:22:23 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32 via Frontend Transport; Wed, 18 Oct 2023 01:22:23 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.101) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.32; Wed, 18 Oct 2023 01:22:22 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iySpTSk0umRY9srUcoCb3KAqJ5kITO/H2Psx0245pQ6Hce83S3Iv5/BQ5EXo+l8rEofauAZkNZZxsGpDOWTgI+pe05hMnzuNLy/jeGcUXZFkpqC46BqgUg+B3sTXB269ybUNETBBwZcZ2YM2BnmRSk9t8a8SN7+ucVG85GIuWLq8jnC+NRE5MFUqXkKw0r5Wd5qAOf1cr/VutaG2Z5GyWrPr6+JyId90bN1YAUD5hdlLjRfuq4yvJwHS9NgHQM38+FCQefxpeoUt6agOC3NgqhmTJFoIpYdZAfOdwgSW4XjEDTmMULPCQYvvIptoGbabOGyEpXTQviBnH+rcPMOQ5g== 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=tmXAnCuaXGrX4SY305m5imab1ILBl7jSnDsDzLQjZ2U=; b=IolucB/LggPA2l2cd+/q32BqJIydYbhIwh5f7EF5P8H7+UmlnH9Oa8X9YZTFPF2LGqhw1D81M/UQnIXqgOUdc3qE0ADYDQR5H7qY+8FJnDOQx6hvPNaYZuBuoCIJtzGE2BTNgcOFZ0ZkRWoEk5TuOoOdFVDWRixAwQ5y+IkVDs6u0vn1CK9N0QlwKUmVszeniPKH+2lH2hwHGxAfM+z2989iRpZBKJZ9oTMdnORfoN8P8pMDy3KyIr4g7vR29UKqPSTP78lUh9WP3Xx01FnlByEUAKqFTGvhatVw5WAXhkMVrfX2yU/tgCUcaFVQbnVnADs18VuenYIswORrmGsY5g== 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 Received: from PH8PR11MB6779.namprd11.prod.outlook.com (2603:10b6:510:1ca::17) by LV2PR11MB5976.namprd11.prod.outlook.com (2603:10b6:408:17c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.36; Wed, 18 Oct 2023 08:22:16 +0000 Received: from PH8PR11MB6779.namprd11.prod.outlook.com ([fe80::134a:412c:eb02:ae17]) by PH8PR11MB6779.namprd11.prod.outlook.com ([fe80::134a:412c:eb02:ae17%5]) with mapi id 15.20.6863.046; Wed, 18 Oct 2023 08:22:15 +0000 Date: Wed, 18 Oct 2023 16:22:02 +0800 From: Oliver Sang To: Yosry Ahmed CC: Shakeel Butt , Andrew Morton , , Feng Tang , Johannes Weiner , Michal Hocko , Roman Gushchin , Muchun Song , Ivan Babrou , Tejun Heo , Michal =?iso-8859-1?Q?Koutn=FD?= , "Waiman Long" , , Wei Xu , Greg Thelen , , , , Subject: Re: [PATCH v2 3/5] mm: memcg: make stats flushing threshold per-memcg Message-ID: References: Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-ClientProxiedBy: SGBP274CA0003.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b0::15) To PH8PR11MB6779.namprd11.prod.outlook.com (2603:10b6:510:1ca::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH8PR11MB6779:EE_|LV2PR11MB5976:EE_ X-MS-Office365-Filtering-Correlation-Id: 42c40863-97ca-46dd-487d-08dbcfb355f4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NuOuAvstxHh4dQ2+ggJ9xGupS9ZK9gFhWtmUmqYkRlU7neX50/9Y/uIOYYZZjRePbN9QhtQttWeJPTgfHCmoMaV4Rb3F2EaiY3rcH2rAnGGB6TefUq76QjMXvXEHSbn7VsY3N9qU99IMIr5HqXjteQHYRPwEJFy4LJSuHwF7mjwaIqp9q2rlqF7UblvC7qLqP+irBsvxLbKsXCVG7+Eti3Lnw22D6dy0oHE2DwwLQR5ArljSrz2FOFNxtI03BMFC9fxN6X3QeTU4AjLGrs0r/zDjU6j1kht4OdLPfE1gF6lHYYcoQKY98Hnrv1TYWXSsfC3UlcOa4cSUvkPXWas/mUX7j5M44003vhB6zDGBWLAD+W5+TjOnny43peVAA16XzZPtNB/i2rWFJPKpJnLYtYbLWvdAwGIhYj1/EwtGIlw5zizZCzg/GloXZA3Wzb6IW1VsUnGqueZ8twI5n6900SLjh5SDZUG8rZQlO7ul/N8qyxbg04nLMY8/7ydKm3yQHuFyFcg3e9W9VbMZgmTuEsweELSf7PqpjVHR/mFHP9UWB8IyISrRmvM/Iy/wflBrnZv1G/9/Mdm1o+QVY9FcdsRsg2ADGizTntagrCy02mvOHKv++i34Qo+9v0VynB41wC5I+DrPCSWA5++4iaA64g== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH8PR11MB6779.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(7916004)(366004)(136003)(376002)(396003)(39860400002)(346002)(230922051799003)(451199024)(186009)(1800799009)(64100799003)(107886003)(66556008)(66946007)(6486002)(54906003)(6666004)(478600001)(966005)(66476007)(6916009)(83380400001)(38100700002)(6512007)(316002)(26005)(9686003)(86362001)(6506007)(53546011)(82960400001)(41300700001)(5660300002)(7416002)(8936002)(8676002)(33716001)(2906002)(4326008)(44832011)(67856001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?YWVvRUN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EtvTmlER2tURzY0d3Jm?= =?utf-8?B?c1JtcWM3MVoxb1NRZWM2ZnFLN3BTZ00vS0xFdSszQzZQeThvVmJUWVI5eFEy?= =?utf-8?B?Rm9yMXNqc2R0WnVoaGFaV216WFlzSlpQYnZQRTllaXVkLzV2eDBUVkNzbzJZ?= =?utf-8?B?SnJwZUZZMldXcGFVUkRqOTVrWG9oUmhKaWZ0dkt4MXNZN25vZGZnaysvcXJn?= =?utf-8?B?YXorN3dJWXVNaHFCdGJ5T2lYRTFHNTNTeFVCNHFxa0xzV1dVVXBpWXdWNnQ0?= =?utf-8?B?SHZmYmp5Z21JSkZDb2FyT1BhQXBoWGc2NmRIQVRuWk16OFgxUEExVlNKdWp4?= =?utf-8?B?b2c4aVUwNXNGY2gvNnhOV2l4Sm1kLzdYTVIzelk4VHVIWUJ4Q094cVdHT1oz?= =?utf-8?B?WHc9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: 42c40863-97ca-46dd-487d-08dbcfb355f4 X-MS-Exchange-CrossTenant-AuthSource: PH8PR11MB6779.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Oct 2023 08:22:15.6575 (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: /nzj48W9dlcCPMQoamm/AsvfgLO/SIN+OyFLeEM5iv4262ULun7Hoas6GkfB0I4N2cvTBEFKBaemELUOejKe2Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR11MB5976 X-OriginatorOrg: intel.com X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 0E7C04001F X-Stat-Signature: 7rx9m46f6ssecj3cohnzpabfbcb1j696 X-Rspam-User: X-HE-Tag: 1697617349-178449 X-HE-Meta: U2FsdGVkX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2ktLOnuXWALeFT1NXrsPE1sKwCQ6roQLwbuawVvfsXgjzwl9hwBpZ8iD36KSniDvnrxNmuSkEHpKdQulBgdqSlWeB+IkLN4irmxgkaIYiHIj70cK02AsX1wNK4Yma46tUgsOPmj/a9cHIPi/5MxewgFPC3tk+gCtSQfJsBeFbK9kL69n0Wtbj5AIheMrio6lgKULJl+Xe/tPcS1fsVPeQpIbl2auXrTR1EZ+wx1YQGWIkWqe9dqNykzFGB62eTYyemxS83sXD1IZOEhDi2wR5kYvPxzoXGDNTAf9YqqVH17Ypitv0X+A== 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: hi, Yosry Ahmed, hi, Shakeel Butt, On Thu, Oct 12, 2023 at 03:23:06PM -0700, Yosry Ahmed wrote: > On Thu, Oct 12, 2023 at 2:39 PM Shakeel Butt wrote: > > > > On Thu, Oct 12, 2023 at 2:20 PM Yosry Ahmed wrote: > > > > > [...] > > > > > > > > Yes this looks better. I think we should also ask intel perf and > > > > phoronix folks to run their benchmarks as well (but no need to block > > > > on them). > > > > > > Anything I need to do for this to happen? (I thought such testing is > > > already done on linux-next) > > > > Just Cced the relevant folks. > > > > Michael, Oliver & Feng, if you have some time/resource available, > > please do trigger your performance benchmarks on the following series > > (but nothing urgent): > > > > https://lore.kernel.org/all/20231010032117.1577496-1-yosryahmed@google.com/ > > Thanks for that. we (0day team) have already applied the patch-set as: c5f50d8b23c79 (linux-review/Yosry-Ahmed/mm-memcg-change-flush_next_time-to-flush_last_time/20231010-112257) mm: memcg: restore subtree stats flushing ac8a48ba9e1ca mm: workingset: move the stats flush into workingset_test_recent() 51d74c18a9c61 mm: memcg: make stats flushing threshold per-memcg 130617edc1cd1 mm: memcg: move vmstats structs definition above flushing code 26d0ee342efc6 mm: memcg: change flush_next_time to flush_last_time 25478183883e6 Merge branch 'mm-nonmm-unstable' into mm-everything <---- the base our tool picked for the patch set they've already in our so-called hourly-kernel which under various function and performance tests. our 0day test logic is if we found any regression by these hourly-kernels comparing to base (e.g. milestone release), auto-bisect will be triggnered. then we only report when we capture a first bad commit for a regression. based on this, if you don't receive any report in following 2-3 weeks, you could think 0day cannot capture any regression from your patch-set. *However*, please be aware that 0day is not a traditional CI system, and also due to resource constraints, we cannot guaratee coverage, we cannot tigger specific tests for your patchset, either. (sorry if this is not your expectation) > > > > > > > > > Also, any further comments on the patch (or the series in general)? If > > > not, I can send a new commit message for this patch in-place. > > > > Sorry, I haven't taken a look yet but will try in a week or so. > > Sounds good, thanks. > > Meanwhile, Andrew, could you please replace the commit log of this > patch as follows for more updated testing info: > > Subject: [PATCH v2 3/5] mm: memcg: make stats flushing threshold per-memcg > > A global counter for the magnitude of memcg stats update is maintained > on the memcg side to avoid invoking rstat flushes when the pending > updates are not significant. This avoids unnecessary flushes, which are > not very cheap even if there isn't a lot of stats to flush. It also > avoids unnecessary lock contention on the underlying global rstat lock. > > Make this threshold per-memcg. The scheme is followed where percpu (now > also per-memcg) counters are incremented in the update path, and only > propagated to per-memcg atomics when they exceed a certain threshold. > > This provides two benefits: > (a) On large machines with a lot of memcgs, the global threshold can be > reached relatively fast, so guarding the underlying lock becomes less > effective. Making the threshold per-memcg avoids this. > > (b) Having a global threshold makes it hard to do subtree flushes, as we > cannot reset the global counter except for a full flush. Per-memcg > counters removes this as a blocker from doing subtree flushes, which > helps avoid unnecessary work when the stats of a small subtree are > needed. > > Nothing is free, of course. This comes at a cost: > (a) A new per-cpu counter per memcg, consuming NR_CPUS * NR_MEMCGS * 4 > bytes. The extra memory usage is insigificant. > > (b) More work on the update side, although in the common case it will > only be percpu counter updates. The amount of work scales with the > number of ancestors (i.e. tree depth). This is not a new concept, adding > a cgroup to the rstat tree involves a parent loop, so is charging. > Testing results below show no significant regressions. > > (c) The error margin in the stats for the system as a whole increases > from NR_CPUS * MEMCG_CHARGE_BATCH to NR_CPUS * MEMCG_CHARGE_BATCH * > NR_MEMCGS. This is probably fine because we have a similar per-memcg > error in charges coming from percpu stocks, and we have a periodic > flusher that makes sure we always flush all the stats every 2s anyway. > > This patch was tested to make sure no significant regressions are > introduced on the update path as follows. The following benchmarks were > ran in a cgroup that is 2 levels deep (/sys/fs/cgroup/a/b/): > > (1) Running 22 instances of netperf on a 44 cpu machine with > hyperthreading disabled. All instances are run in a level 2 cgroup, as > well as netserver: > # netserver -6 > # netperf -6 -H ::1 -l 60 -t TCP_SENDFILE -- -m 10K > > Averaging 20 runs, the numbers are as follows: > Base: 40198.0 mbps > Patched: 38629.7 mbps (-3.9%) > > The regression is minimal, especially for 22 instances in the same > cgroup sharing all ancestors (so updating the same atomics). > > (2) will-it-scale page_fault tests. These tests (specifically > per_process_ops in page_fault3 test) detected a 25.9% regression before > for a change in the stats update path [1]. These are the > numbers from 10 runs (+ is good) on a machine with 256 cpus: > > LABEL | MEAN | MEDIAN | STDDEV | > ------------------------------+-------------+-------------+------------- > page_fault1_per_process_ops | | | | > (A) base | 270249.164 | 265437.000 | 13451.836 | > (B) patched | 261368.709 | 255725.000 | 13394.767 | > | -3.29% | -3.66% | | > page_fault1_per_thread_ops | | | | > (A) base | 242111.345 | 239737.000 | 10026.031 | > (B) patched | 237057.109 | 235305.000 | 9769.687 | > | -2.09% | -1.85% | | > page_fault1_scalability | | | > (A) base | 0.034387 | 0.035168 | 0.0018283 | > (B) patched | 0.033988 | 0.034573 | 0.0018056 | > | -1.16% | -1.69% | | > page_fault2_per_process_ops | | | > (A) base | 203561.836 | 203301.000 | 2550.764 | > (B) patched | 197195.945 | 197746.000 | 2264.263 | > | -3.13% | -2.73% | | > page_fault2_per_thread_ops | | | > (A) base | 171046.473 | 170776.000 | 1509.679 | > (B) patched | 166626.327 | 166406.000 | 768.753 | > | -2.58% | -2.56% | | > page_fault2_scalability | | | > (A) base | 0.054026 | 0.053821 | 0.00062121 | > (B) patched | 0.053329 | 0.05306 | 0.00048394 | > | -1.29% | -1.41% | | > page_fault3_per_process_ops | | | > (A) base | 1295807.782 | 1297550.000 | 5907.585 | > (B) patched | 1275579.873 | 1273359.000 | 8759.160 | > | -1.56% | -1.86% | | > page_fault3_per_thread_ops | | | > (A) base | 391234.164 | 390860.000 | 1760.720 | > (B) patched | 377231.273 | 376369.000 | 1874.971 | > | -3.58% | -3.71% | | > page_fault3_scalability | | | > (A) base | 0.60369 | 0.60072 | 0.0083029 | > (B) patched | 0.61733 | 0.61544 | 0.009855 | > | +2.26% | +2.45% | | > > All regressions seem to be minimal, and within the normal variance for > the benchmark. The fix for [1] assumes that 3% is noise -- and there were no > further practical complaints), so hopefully this means that such variations > in these microbenchmarks do not reflect on practical workloads. > > (3) I also ran stress-ng in a nested cgroup and did not observe any > obvious regressions. > > [1]https://lore.kernel.org/all/20190520063534.GB19312@shao2-debian/