Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp958090pxk; Fri, 25 Sep 2020 02:23:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzyF26sefNltGbMLrQlPvtg8sr5C8yJlGdr3IUIbSmHazu+ey/4VedmELaMm6i29WAuPBXk X-Received: by 2002:a17:907:20d9:: with SMTP id qq25mr1670196ejb.382.1601025798645; Fri, 25 Sep 2020 02:23:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601025798; cv=none; d=google.com; s=arc-20160816; b=S8zAoO0FLWC3l0kKxTkqmv5FBZWt2Uq0ZtjmQx60wkcRIP9L4hN9Wg1TcR29w6bsx6 JKlBKrSOUIxxyp+rJENWgyo0wVoGYzTtpuBwTqa6kxw2HcZt0cKCbYRmTtvLQ79zw1UC AVmuvbsRn8twcJrf/MdA7Qb/114W8yZTCMr291nF95fkpMpRTF2OG3cCBX4P7TQ5+Ikw M9buGJ3qjjynI4WRdis/cyBV1+vGzh48QoQK0s5LTpTK9Ga3EFPB8EL1wQ34yqmWk+7l 3MYhWHu2v/+PK5ow2LkWIMYLWVzSWFFcUQokgzGXsRynJk0XcvoA78rtC54XPsT31YeA GutA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=s6Soqyk9TUtqpnHJ2ncBHMPcNqWPxACRWfwiFF/VLk8=; b=g/ltIldhDhMphrSbegPSxEE1Cg1SdAN9IT7d9r0dhW1BT7UMgKS8E9pkJQ5KLqPWlv 2L4fELoNYi79MmKyEUFc4BWSP+rgXr7IrtLwRvg5hIv6U0yvr8AJtMz6T8Av7lIZoaV/ 1vdk8ppSQTQS0GpGyOACvmXXlfme9964dGHr3kNEtSNpQ6XozGBQivcsLojbMamGhNMU j5tmSM75rC1Au9mpIH9kF9t0fVF3EaAhEgUEi3Kfkcg08pkG23nxFsEZDeQFg/UBAVEo Qm1ptbgJFnWuglXPP6AMJsDXqtY9PVol/yhkXaqf3oM+AxjO19EVFarUDwxA1xRxK7AV SSnQ== 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 z9si1410141ejb.479.2020.09.25.02.22.55; Fri, 25 Sep 2020 02:23:18 -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 S1727440AbgIYJVw (ORCPT + 99 others); Fri, 25 Sep 2020 05:21:52 -0400 Received: from mga07.intel.com ([134.134.136.100]:21174 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727044AbgIYJVv (ORCPT ); Fri, 25 Sep 2020 05:21:51 -0400 IronPort-SDR: TcM1JbTTnu6ZYnD5l+OtPaw+YAa9E/SUT1P6n8eTzDwdhIErHnxdmeJS8afsv96H6alYSKXhzG pMt9YbW2BTag== X-IronPort-AV: E=McAfee;i="6000,8403,9754"; a="225627852" X-IronPort-AV: E=Sophos;i="5.77,301,1596524400"; d="scan'208";a="225627852" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2020 02:21:50 -0700 IronPort-SDR: GnWlVXH2COUlTOYI4xducBox4WNW9rWVYgmi7FqIRxFRXZW+ofpe1R2j1Axh1oHmcUGz0nMmJ0 n908P0xnvLbw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,301,1596524400"; d="scan'208";a="336532486" Received: from cli6-desk1.ccr.corp.intel.com (HELO [10.239.161.135]) ([10.239.161.135]) by fmsmga004.fm.intel.com with ESMTP; 25 Sep 2020 02:21:47 -0700 Subject: Re: [RFC PATCH v2] sched/fair: select idle cpu from idle cpumask in sched domain To: Vincent Guittot Cc: Mel Gorman , Ingo Molnar , Peter Zijlstra , Juri Lelli , Dietmar Eggemann , Steven Rostedt , Ben Segall , Valentin Schneider , Tim Chen , linux-kernel , Qais Yousef , Jiang Biao References: <20200916043103.606132-1-aubrey.li@linux.intel.com> <20200916110039.GG3117@suse.de> <78d608f2-b974-e940-da32-b37777bc405a@linux.intel.com> <8a86b085-b445-b1c2-9b46-6346d923abf0@linux.intel.com> From: "Li, Aubrey" Message-ID: Date: Fri, 25 Sep 2020 17:21:46 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Vicent, On 2020/9/24 21:09, Vincent Guittot wrote: >>>> >>>> Would you mind share uperf(netperf load) result on your side? That's the >>>> workload I have seen the most benefit this patch contributed under heavy >>>> load level. >>> >>> with uperf, i've got the same kind of result as sched pipe >>> tip/sched/core: Throughput 24.83Mb/s (+/- 0.09%) >>> with this patch: Throughput 19.02Mb/s (+/- 0.71%) which is a 23% >>> regression as for sched pipe >>> >> In case this is caused by the logic error in this patch(sorry again), did >> you see any improvement in patch V2? Though it does not helps for nohz=off >> case, just want to know if it helps or does not help at all on arm platform. > > With the v2 which rate limit the update of the cpumask (but doesn't > support sched_idle stask), I don't see any performance impact: I agree we should go the way with cpumask update rate limited. And I think no performance impact for sched-pipe is expected, as this workload has only 2 threads and the platform has 8 cores, so mostly previous cpu is returned, and even if select_idle_sibling is called, select_idle_core is hit and rarely call select_idle_cpu. But I'm more curious why there is 23% performance penalty? So for this patch, if you revert this change but keep cpumask updated, is 23% penalty still there? - cpumask_and(cpus, sched_domain_span(sd), p->cpus_ptr); + cpumask_and(cpus, sds_idle_cpus(sd->shared), p->cpus_ptr); I just wonder if it's caused by the atomic ops as you have two cache domains with sd_llc(?). Do you have a x86 machine to make a comparison? It's hard for me to find an ARM machine but I'll try. Also, for uperf(task thread num = cpu num) workload, how is it on patch v2? no any performance impact? Thanks, -Aubrey