Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp2553755pxb; Sun, 5 Sep 2021 23:10:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnfSJVQn14oyj3kVfuVTDwV7BYM3NBfZcbPBzXXAr2/jcdjJ0tyoXpSOULmeNXcOJYTZ+E X-Received: by 2002:a05:6e02:d43:: with SMTP id h3mr7369486ilj.112.1630908633027; Sun, 05 Sep 2021 23:10:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630908633; cv=none; d=google.com; s=arc-20160816; b=TR4kIcL0LJ/lNMn1AwPH8UhxbKDHS4aqoPaADtguPBDTfAXLcCIrsZecPkUZGylDNq pJjR0nFlzIALuhWDehZaV+GyCz08nNDdIRfNNtfxgU83di96mU9dojOEdd8H3QmLYa6u EA+7kV/A3zTMiiz95b1HCMAfCifGH0QmdMNwJq5KxJiobpzad0FNubSFaFtYlA67TpKQ /lct7Zi3POWIc8Ts8uwYdgFKo6ifeOXlju3TYbBL7F0mpP2FIUWK6akY+JwlH2K2wgmE Mjjp64udptO6FTq0EYSdBd4WXPg3wkCd9byhRQ84/We2E8c2gQ3Lal+3N//JaYEVbeKr hc6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from; bh=YvRFhOfHmQPXRBuVrd6/04kG9E61+GCH2gcQFYscMrY=; b=U/UFmuPIiNLvmqZbXvBnO0mcQ7627kE1/0UV0uEVCw3ZMJPPOcv5x1waVMWKjCpZpF hGBsdLDw8x3hVu9OVDic5TQajEJp5F8XnTTU/fmMYrEQF9iLd7ebhS3RMresJB31KJHi WVCHhr+Tin/nmYapvx5BEV8+KFY8pXLUgxCq06h9EQpRxBFCIEvibKxXTDlyR0jMPXEJ 4zzfVlYpbnNtB8EGPGsE0BkIxlwxbUfv0vkbHkQ79giT3BbgoMCvThS6XlAqOkFOpOu0 cWlRuVmYpQkp8zP4uVWAC+ppBf+6WcKIpqqfiI8Qte3L791Hx/dyhqJCdgwRUu6KyIq1 jdKg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b16si6243810ila.182.2021.09.05.23.10.21; Sun, 05 Sep 2021 23:10:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239362AbhIFF7Q (ORCPT + 99 others); Mon, 6 Sep 2021 01:59:16 -0400 Received: from mga07.intel.com ([134.134.136.100]:45375 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239371AbhIFF7K (ORCPT ); Mon, 6 Sep 2021 01:59:10 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10098"; a="283601165" X-IronPort-AV: E=Sophos;i="5.85,271,1624345200"; d="scan'208";a="283601165" 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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