Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2879872pxu; Mon, 7 Dec 2020 19:33:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJwf1Pyx7eiZ6d2XZPln1Sg3DgkguPg8LSyAb3ivd43sT1ZhxPTEFQvDXFYS4jJWxvPmZ6Mz X-Received: by 2002:a17:906:3c11:: with SMTP id h17mr21152545ejg.20.1607398409736; Mon, 07 Dec 2020 19:33:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607398409; cv=none; d=google.com; s=arc-20160816; b=uN0zZEdJRYYD1DdSfAKSIsn+ughF/M9DNTEUi+q6d+H3Eu2vq/0l+1QoMrkRNNOyt2 NVLnQquPi0wCCsTnds7pLG1cewH4RMPIr2+KWZk+1WUvLQJbdf1bh2Pm4M8Ew+yA00VA YbKGKML4dCi/J8fjp+MVzdGCDY3W/M286bzBGbZC7fiG/hMRN21rTS8K1ulFXw8tchuD /8BPhEM1Bx9IqGXSfCfSLDoV+Uh5egHaeVJfAS7/O8XMkSqcUmb2uodK+jizFGUU47CO ZcfidPAVB8r45gNB0JXiVtOL6C7HMaFRZIuFIABj7nvvFJJKpclXBbVMDHC7GCVtsr7V h/1g== 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=+qIF/0oVtkmEzNL8ws7tOx4khMR9jtFM//iZ6C/52S0=; b=tvavHX7mMKAvYtpg/PdeOjth6WUGKQIlzfF+1CvfY4ySb1B0SRpTIdDi1dPEGCbxfF oi4AdL4rB6G7fWuUJr6jldJuKj8+sHlyxef6VE+eyFGERO3cxJ4hXlzcahrF6FRP58Z6 IQT1BQzR+UhiPF2RYCpHqzV55vUsWWVwNq5uYLYBT0FFv03voZpK8Jlx4BhxyXdJ3gDr pRB0v71/hu3yVVTAzFCMJPU1izvwMrtN7lw/xRQrjoB7Y2QnqgorIKDQVB8/4mPvQFgh 9r7CO4m+1dtaWHQuX++ZszZZIEtoVQepQKn8v/IuxiUYbBPqvt7oRU+oHtVaS5ez98G3 ZMzA== 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 n8si8095621edt.440.2020.12.07.19.32.52; Mon, 07 Dec 2020 19:33:29 -0800 (PST) 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 S1727517AbgLHCIZ (ORCPT + 99 others); Mon, 7 Dec 2020 21:08:25 -0500 Received: from mga12.intel.com ([192.55.52.136]:50515 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725877AbgLHCIZ (ORCPT ); Mon, 7 Dec 2020 21:08:25 -0500 IronPort-SDR: Z5eIp2rArFljrypTy6Z4rdk1YiqjlPxf4pu79/TRoPOA5d4KKgosZRti+ueQ5/kaPpHGRkC+RK /jWRLqkJWERQ== X-IronPort-AV: E=McAfee;i="6000,8403,9828"; a="153054075" X-IronPort-AV: E=Sophos;i="5.78,401,1599548400"; d="scan'208";a="153054075" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Dec 2020 18:06:40 -0800 IronPort-SDR: mRW2hLrS8WIzcV5YaJ+awzzv8yiTvuX95femrWkLHoMumS/7GTNyL1ZRvtOFarpzodmL85wQa0 KUxFVqnkOIxA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,401,1599548400"; d="scan'208";a="375689516" Received: from cli6-desk1.ccr.corp.intel.com (HELO [10.239.161.125]) ([10.239.161.125]) by FMSMGA003.fm.intel.com with ESMTP; 07 Dec 2020 18:06:38 -0800 Subject: Re: [RFC PATCH 0/4] Reduce worst-case scanning of runqueues in select_idle_sibling To: Mel Gorman , Vincent Guittot Cc: LKML , Barry Song , Ingo Molnar , Peter Ziljstra , Juri Lelli , Valentin Schneider , Linux-ARM References: <20201207091516.24683-1-mgorman@techsingularity.net> <20201207154216.GE3371@techsingularity.net> From: "Li, Aubrey" Message-ID: <895d0c8a-5039-e569-80f3-a8a6f87380bd@linux.intel.com> Date: Tue, 8 Dec 2020 10:06:37 +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: <20201207154216.GE3371@techsingularity.net> Content-Type: text/plain; charset=iso-8859-15 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/12/7 23:42, Mel Gorman wrote: > On Mon, Dec 07, 2020 at 04:04:41PM +0100, Vincent Guittot wrote: >> On Mon, 7 Dec 2020 at 10:15, Mel Gorman wrote: >>> >>> This is a minimal series to reduce the amount of runqueue scanning in >>> select_idle_sibling in the worst case. >>> >>> Patch 1 removes SIS_AVG_CPU because it's unused. >>> >>> Patch 2 improves the hit rate of p->recent_used_cpu to reduce the amount >>> of scanning. It should be relatively uncontroversial >>> >>> Patch 3-4 scans the runqueues in a single pass for select_idle_core() >>> and select_idle_cpu() so runqueues are not scanned twice. It's >>> a tradeoff because it benefits deep scans but introduces overhead >>> for shallow scans. >>> >>> Even if patch 3-4 is rejected to allow more time for Aubrey's idle cpu mask >> >> patch 3 looks fine and doesn't collide with Aubrey's work. But I don't >> like patch 4 which manipulates different cpumask including >> load_balance_mask out of LB and I prefer to wait for v6 of Aubrey's >> patchset which should fix the problem of possibly scanning twice busy >> cpus in select_idle_core and select_idle_cpu >> > > Seems fair, we can see where we stand after V6 of Aubrey's work. A lot > of the motivation for patch 4 would go away if we managed to avoid calling > select_idle_core() unnecessarily. As it stands, we can call it a lot from > hackbench even though the chance of getting an idle core are minimal. > Sorry for the delay, I sent v6 out just now. Comparing to v5, v6 followed Vincent's suggestion to decouple idle cpumask update from stop_tick signal, that is, the CPU is set in idle cpumask every time the CPU enters idle, this should address Peter's concern about the facebook trail-latency workload, as I didn't see any regression in schbench workload 99.0000th latency report. However, I also didn't see any significant benefit so far, probably I should put more load on the system. I'll do more characterization of uperf workload to see if I can find anything. Thanks, -Aubrey