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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 186A5C433F5 for ; Mon, 6 Sep 2021 05:58:09 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AEB9C60C51 for ; Mon, 6 Sep 2021 05:58:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org AEB9C60C51 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 06241900002; Mon, 6 Sep 2021 01:58:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F2CD86B0072; Mon, 6 Sep 2021 01:58:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DF4CB900002; Mon, 6 Sep 2021 01:58:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0089.hostedemail.com [216.40.44.89]) by kanga.kvack.org (Postfix) with ESMTP id D13E26B0071 for ; Mon, 6 Sep 2021 01:58:07 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 74189181AF5EA for ; Mon, 6 Sep 2021 05:58:07 +0000 (UTC) X-FDA: 78556093014.15.79BD1FC Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by imf17.hostedemail.com (Postfix) with ESMTP id 5A6F1F000392 for ; Mon, 6 Sep 2021 05:58:06 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10098"; a="283601161" X-IronPort-AV: E=Sophos;i="5.85,271,1624345200"; d="scan'208";a="283601161" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Sep 2021 22:58:04 -0700 X-IronPort-AV: E=Sophos;i="5.85,271,1624345200"; d="scan'208";a="546073707" Received: from yhuang6-desk2.sh.intel.com (HELO yhuang6-desk2.ccr.corp.intel.com) ([10.239.159.119]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Sep 2021 22:57:58 -0700 From: "Huang, Ying" To: Dave Hansen Cc: kernel test robot , Rui Zhang , Chen Yu , Len Brown , "Rafael J. Wysocki" , Andrew Morton , 0day robot , Yang Shi , Zi Yan , Michal Hocko , Wei Xu , Oscar Salvador , David Rientjes , Dan Williams , David Hildenbrand , Greg Thelen , Keith Busch , Yang Shi , LKML , , , , , , , Subject: Re: [mm/migrate] 9eeb73028c: stress-ng.memhotplug.ops_per_sec -53.8% regression References: <20210905135932.GE15026@xsang-OptiPlex-9020> <87y28aii58.fsf@yhuang6-desk2.ccr.corp.intel.com> Date: Mon, 06 Sep 2021 13:57:56 +0800 In-Reply-To: (Dave Hansen's message of "Sun, 5 Sep 2021 20:57:55 -0700") Message-ID: <87lf4ai6u3.fsf@yhuang6-desk2.ccr.corp.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii Authentication-Results: imf17.hostedemail.com; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=intel.com (policy=none); spf=none (imf17.hostedemail.com: domain of ying.huang@intel.com has no SPF policy when checking 134.134.136.100) smtp.mailfrom=ying.huang@intel.com X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 5A6F1F000392 X-Stat-Signature: bui5iso941unyajm7om6rhb49gfgh3bb X-HE-Tag: 1630907886-98576 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: Dave Hansen writes: > On 9/5/21 6:53 PM, Huang, Ying wrote: >>> in testcase: stress-ng >>> on test machine: 96 threads 2 sockets Intel(R) Xeon(R) Gold 6252 CPU @ 2.10GHz with 192G memory >>> with following parameters: >>> >>> nr_threads: 10% >>> disk: 1HDD >>> testtime: 60s >>> fs: ext4 >>> class: os >>> test: memhotplug >>> cpufreq_governor: performance >>> ucode: 0x5003006 >>> >> Because we added some operations during online/offline CPU, it's >> expected that the performance of online/offline CPU will decrease. In >> most cases, the performance of CPU hotplug isn't a big problem. But >> then I remembers that the performance of the CPU hotplug may influence >> suspend/resume performance :-( >> >> It appears that it is easy and reasonable to enclose the added >> operations inside #ifdef CONFIG_NUMA. Is this sufficient to restore the >> performance of suspend/resume? > > It's "memhotplug", not CPUs, right? Yes. Thanks for pointing that out! We will update node_demotion[] in CPU hotplug too. Because the status that whether a node has CPU may change after CPU hotplug. And CPU online/offline performance may be relevant for suspend/resume. > I didn't do was to actively go out and look for changes that would > affect the migration order. The code just does regenerates and writes > the order blindly when it sees any memory hotplug event. I have the > feeling the synchronize_rcu()s are what's killing us. > > It would be pretty easy to go and generate the order, but only do the > update and the RCU bits when the order changes from what was there. > > I guess we have a motivation now. I don't know whether the performance of memory hotplug is important or not. But it should be welcome not to make it too bad. You proposal sounds good. Best Regards, Huang, Ying