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 D4FD3CDB46E for ; Thu, 12 Oct 2023 12:50:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6B8388D0126; Thu, 12 Oct 2023 08:50:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 668538D0002; Thu, 12 Oct 2023 08:50:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 557B18D0126; Thu, 12 Oct 2023 08:50:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 462658D0002 for ; Thu, 12 Oct 2023 08:50:05 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 1580C804D7 for ; Thu, 12 Oct 2023 12:50:05 +0000 (UTC) X-FDA: 81336791970.16.3F6EFED Received: from outbound-smtp12.blacknight.com (outbound-smtp12.blacknight.com [46.22.139.17]) by imf19.hostedemail.com (Postfix) with ESMTP id C238A1A0016 for ; Thu, 12 Oct 2023 12:50:02 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=none; spf=pass (imf19.hostedemail.com: domain of mgorman@techsingularity.net designates 46.22.139.17 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1697115003; 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; bh=7CLCsfd4sRV2jjKLz/glkanNtygQ9gHnRmXk+ux5wVY=; b=PnZZ4VJe72CyCWf9VzlmPEdCp4IiJsHokG1wqqBQA9DA4zCUUzD4vcEmCl83VMb7XTU22U 0Bj+/F2CvAN5LXsVczrKVSt0rkTyviL5g7h3DeCrQK2+/zBYqQzDgwb6OvHJHgsIVtPwVF H8rrBlEuzgRpTRGub/lqQCW7zC+2Dik= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=none; spf=pass (imf19.hostedemail.com: domain of mgorman@techsingularity.net designates 46.22.139.17 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1697115003; a=rsa-sha256; cv=none; b=H3vp2iRJQNegKKT+7BEzbP9AcAgTo9t5SLXMt0lswGYFfe93NokJ+GyVZqgSfKdMb/4R02 WwFa8t2SRvInNlYRtLTLO3WXLY9IF8CXcesamxXmzBgMnRTlkMWRwcKEQJy4eFSxUE8dVh cCf/h0PkaDGgABtyd9Ee1EMpUYG0TYE= Received: from mail.blacknight.com (pemlinmail05.blacknight.ie [81.17.254.26]) by outbound-smtp12.blacknight.com (Postfix) with ESMTPS id 8CC711C3F4E for ; Thu, 12 Oct 2023 13:50:00 +0100 (IST) Received: (qmail 5189 invoked from network); 12 Oct 2023 12:50:00 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.197.19]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 12 Oct 2023 12:50:00 -0000 Date: Thu, 12 Oct 2023 13:49:58 +0100 From: Mel Gorman To: "Huang, Ying" Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, 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 Message-ID: <20231012124958.dj5ug5hih3joa542@techsingularity.net> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <87lec8ffij.fsf@yhuang6-desk2.ccr.corp.intel.com> X-Rspamd-Queue-Id: C238A1A0016 X-Rspam-User: X-Stat-Signature: rz1ewagd8oyakki8sahzo5k1bax34noe X-Rspamd-Server: rspam01 X-HE-Tag: 1697115002-847404 X-HE-Meta: U2FsdGVkX1+GDKksaCVwy6MxIIeBOYzTMncHNPGyZYv14DinjFeVvMMHVjzkyFad5EvURs1a8DRBJV4HGizfbWAy0jq32X+CI39+BtOFIvURm5mMzcUjCpNai7osCAgQu8V3HY0kngnkpH1F2kjaIO+eQZ1DpHjJsoOzDzLwxPEk7JOoCSNLgA15MFue4axptlm9PPtpCAAMeH/8fMXWcUmqU8kKKzzZ2N423L+bM5h0YiCZRgMrf2LkaNZblTIpcuolKOZ6F9DDJkrOzj4kr80DV6O6JFcTp4Euzd+uC5+jILasQi+Lg1kV3YQtvgcqsv9A9ZIZFWw60T7FWYyti3vUzFbylGiinKpanGF1nB8tsYXITqEd4M/A7al46jKAH+4XZpip3k4T2YkKzABRqyWplY0l+mzqa2UTF6JhurPGLF/9X9FuMPgvq0Q9FvY1sHGTK0jwDq8dunA3Bb07dNiuCVocpzZOU8O1xIT1uNeAtFUvDkJGsivq4NSPginPxmr+orftMWN6uoo8HbxoaSr8q0KSiHcS+MKXn6r64eJAGpvPMpYm9RtksjMgmmp5QqxYCCskqWrUV3WIGYoB3L1R+Y2QXCbOsYEuvzN3x1SNIPN2PHsxW23BJ1xy1hzcSQBM6aX8wnxb9rt6Kb+aH83B/NzvDItyVB25Vkc8gqXueLleoUcVeAVfIRuFpE841ukScee/j7cYwPmsJPlN7GnnDkO69jDKVuZmmxstsy3IbdaWc70Cxq2fnRE4b9ZgB0zkltjkxiw/KUr3NNhFIy+wD9o44dDn8eXAokkmf9pC8IM6MRskK4ef34yGAQbKg+uf9yGDSF/rVyd5SGf33YzlcXr4ft7/dgqFkI4fQpUkpuzZeyStO6KWj3sAI1sRWqEKIEB2g8jbFJLgffx5fqInj0WY/rz6Bavw62bJ6h5pDoumlak426Jw5Tm9cLDlcrFwGmRekfWtfagRrJ2 rOEi3fGo 8I4P3tF3UDHcpp+uiu5fV1w7ZktVKABNpOOOPYlI4xWaTPVgdccPF73q+vU0tRY0Fh/8FVERF0hjfztgmbJPDM6iLjhW87Yyaf38QK8Kw2fuAWj0OHx1DO7FzScfDgX73zyEvEYkbvzfBONptnvrua6ruykkhsYq91yXtONDkksVo6bA= 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: 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. -- Mel Gorman SUSE Labs