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 ADC14CDB46E for ; Thu, 12 Oct 2023 13:24:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2FEFD8D0127; Thu, 12 Oct 2023 09:24:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2AF2E8D0002; Thu, 12 Oct 2023 09:24:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 19E058D0127; Thu, 12 Oct 2023 09:24:32 -0400 (EDT) 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 093428D0002 for ; Thu, 12 Oct 2023 09:24:32 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id C8E351405DE for ; Thu, 12 Oct 2023 13:24:31 +0000 (UTC) X-FDA: 81336878742.20.F90C36F Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by imf05.hostedemail.com (Postfix) with ESMTP id 7F0D410000C for ; Thu, 12 Oct 2023 13:24:29 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=JSfhQaj7; spf=pass (imf05.hostedemail.com: domain of ying.huang@intel.com designates 198.175.65.9 as permitted sender) smtp.mailfrom=ying.huang@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1697117070; a=rsa-sha256; cv=none; b=ZIWDdiD5Ss0dYL6mOkNJrj/wTTbPUzP1jikrQ5+kJhDI9FRF6I7FlGl0ZgebXjrylTldLM dTD4LI04Of7TGMOh8w55P6hqBi0gN43aU03GMqvaloJWABCSBAwmFloFWYPcIIDjT3lLE7 FZzRIfbusul98EuS80NTxaT1Yv9RCw8= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=JSfhQaj7; spf=pass (imf05.hostedemail.com: domain of ying.huang@intel.com designates 198.175.65.9 as permitted sender) smtp.mailfrom=ying.huang@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1697117070; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=spaohdgI24cG4kQHtyiiSD+lhPwRDc3CWohPOVbu6/o=; b=UxKFwnHxiYt/OcRWrgj8TEHSSxdzxGILbmIFgnEId4vDu7s9MM32zGodXXXXuXSfoWmkY7 6FgzKsrFZxWkSYRCLTAKr+eJRHb6mOa+cBo2rvsAnH/ePLPbuxBACpp73XcU+6V0SOM4kY pSx45vhZZOF0qJ0kZtuSRBPvX8ou0+Y= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697117069; x=1728653069; h=from:to:cc:subject:references:date:in-reply-to: message-id:mime-version; bh=cZ4V9GzEqz4BgoOaXGC/uxjgn6AC9Hl2WV/jrbzKEVY=; b=JSfhQaj7BjhXYvpgBi2bMPlO1FV7rmeOcrzwlOTcd+Bbgb+YuEQ4B/tb 26w0oBOD2qQ3tSIfuprbtoRHEwGMRt6Sfu+Ccgn726zLn3Xlget8+opO8 OSpGcv91nfd38biRapf3tsRNMou8s/Ac4uGT7y+vGNrByUtjXoeHDmu+x eDIY0vvX3FREbTt8hN6PggKvecGeYIuHpmyfVooBPb/iJsY8aev7a8rNR V9nNJbJ1v9D3XdyPZfSkdy7VE/fVDdNYylS1SQ/pDOcHHt9iCxV9XB3Yc Dd8sRLaZlpG3GDaw79kMFUYv7iv7B0eTCQ3ceDxtvctDkqqtgnZrednfr A==; X-IronPort-AV: E=McAfee;i="6600,9927,10861"; a="3519286" X-IronPort-AV: E=Sophos;i="6.03,219,1694761200"; d="scan'208";a="3519286" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2023 06:21:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10861"; a="927982873" X-IronPort-AV: E=Sophos;i="6.03,219,1694761200"; d="scan'208";a="927982873" Received: from yhuang6-desk2.sh.intel.com (HELO yhuang6-desk2.ccr.corp.intel.com) ([10.238.208.55]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2023 06:21:08 -0700 From: "Huang, Ying" To: Mel Gorman Cc: , , Arjan Van De Ven , Andrew Morton , Vlastimil Babka , David Hildenbrand , Johannes Weiner , Dave Hansen , Michal Hocko , Pavel Tatashin , Matthew Wilcox , "Christoph Lameter" Subject: Re: [PATCH 09/10] mm, pcp: avoid to reduce PCP high unnecessarily References: <20230920061856.257597-1-ying.huang@intel.com> <20230920061856.257597-10-ying.huang@intel.com> <20231011140949.rwsqfb57vyuub6va@techsingularity.net> <87lec8ffij.fsf@yhuang6-desk2.ccr.corp.intel.com> <20231012124958.dj5ug5hih3joa542@techsingularity.net> Date: Thu, 12 Oct 2023 21:19:03 +0800 In-Reply-To: <20231012124958.dj5ug5hih3joa542@techsingularity.net> (Mel Gorman's message of "Thu, 12 Oct 2023 13:49:58 +0100") Message-ID: <87r0m0dlmg.fsf@yhuang6-desk2.ccr.corp.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii X-Rspamd-Server: rspam08 X-Rspamd-Queue-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GYnn8 Gfe/JqvtcU2oeKnMH3yETuQ+PncKqZKmuQZlnLdbjOQBweoEQ8SPkRkAzB56U4N2YGn2l9EvqGQjbbbkWdDVD4R2a7Hh8hfqoMoFV+QFXBX+ZfkAx0TYSFLagMvNSqvedjncL/hORE/qNRw9Io2uOReqx6+6vMmeUTYRv4Pvr4f07LkYWssWhI3KfobjImOR+sw7jGuGBlPMS590= 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: Mel Gorman writes: > On Thu, Oct 12, 2023 at 03:48:04PM +0800, Huang, Ying wrote: >> " >> On a 2-socket Intel server with 224 logical CPU, we run 8 kbuild >> instances in parallel (each with `make -j 28`) in 8 cgroup. This >> simulates the kbuild server that is used by 0-Day kbuild service. >> With the patch, The number of pages allocated from zone (instead of >> from PCP) decreases 21.4%. >> " >> >> I also showed the performance number for each step of optimization as >> follows (copied from the above patchset V2 link). >> >> " >> build time lock contend% free_high alloc_zone >> ---------- ---------- --------- ---------- >> base 100.0 13.5 100.0 100.0 >> patch1 99.2 10.6 19.2 95.6 >> patch3 99.2 11.7 7.1 95.6 >> patch5 98.4 10.0 8.2 97.1 >> patch7 94.9 0.7 3.0 19.0 >> patch9 94.9 0.6 2.7 15.0 <-- this patch >> patch10 94.9 0.9 8.8 18.6 >> " >> >> Although I think the patch is helpful via avoiding the unnecessary >> pcp->high decaying, thus reducing the zone lock contention. There's no >> visible benchmark score change for the patch. >> > > Thanks! > > Given that it's another PCP field with an update in a relatively hot > path, I would suggest dropping this patch entirely if it does not affect > performance. It has the risk of being a magical heuristic that we forget > later whether it's even worthwhile. OK. Hope we can find some workloads that can benefit from the patch in the future. -- Best Regards, Huang, Ying