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 CC3C1C433EF for ; Mon, 6 Sep 2021 08:32:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AADAD60F92 for ; Mon, 6 Sep 2021 08:32:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240718AbhIFIdJ (ORCPT ); Mon, 6 Sep 2021 04:33:09 -0400 Received: from mga02.intel.com ([134.134.136.20]:46653 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230161AbhIFIdI (ORCPT ); Mon, 6 Sep 2021 04:33:08 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10098"; a="207142670" X-IronPort-AV: E=Sophos;i="5.85,271,1624345200"; d="scan'208";a="207142670" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2021 01:32:03 -0700 X-IronPort-AV: E=Sophos;i="5.85,271,1624345200"; d="scan'208";a="536634574" Received: from yhuang6-desk2.sh.intel.com (HELO yhuang6-desk2.ccr.corp.intel.com) ([10.239.159.119]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2021 01:31:46 -0700 From: "Huang, Ying" To: Chen Yu Cc: Dave Hansen , kernel test robot , Rui Zhang , 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> <87lf4ai6u3.fsf@yhuang6-desk2.ccr.corp.intel.com> <20210906060908.GA17483@chenyu5-mobl1> Date: Mon, 06 Sep 2021 16:31:41 +0800 In-Reply-To: <20210906060908.GA17483@chenyu5-mobl1> (Chen Yu's message of "Mon, 6 Sep 2021 14:09:08 +0800") Message-ID: <874kayhzpu.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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Chen Yu writes: > On Mon, Sep 06, 2021 at 01:57:56PM +0800, Huang, Ying wrote: >> 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. >> > Rui and I took a look at the default kernel config, it seems that CONFIG_NUMA is > enabled on laptops on some distributions. Maybe a runtime detecting flag indicating > that whether this system has enabled NUMA (static key eg) would be an option too, so as > not to enable node_demotion[] on non-NUMA laptops/desktops. Got it! Thanks for your information. Maybe we can try Dave's method firstly and check whether that's OK for suspend/resume. Best Regards, Huang, Ying