Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp924041pxu; Wed, 2 Dec 2020 06:52:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJww28KcZFMcP+NBVapl3zLCU17O2DilAX6xZlg2lfdX0CZNvAwvUIFliowLjXJkRcCcRdzi X-Received: by 2002:a17:906:ae41:: with SMTP id lf1mr34661ejb.369.1606920728481; Wed, 02 Dec 2020 06:52:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606920728; cv=none; d=google.com; s=arc-20160816; b=SeOv5x8ebATHCfwDX09UFQJFPKERjPN6J6PYmcUsNDLRwwrLdV8ZNr2IuxFb4kqCGy tEw26RtxLiGReRg3Co5perVUuOYoeB0BOfHxzlRKPSLjhgv7k8lBuVWDKlSkdPU2bQRy k2OfOI5UDF+dI05Gu7NSZmR9G5mQpqtRneZp+sE6kv514xzTPtWdgX7OaZ5YhnB5B9rw rNB4HaCSUC72yX/xRdfKKTX4r2yf7raJ39OJz2w/7/3R/in0C8sKZWlw/mioq5IxwanX 9R8oE51/rWC8SZ+C4dHFzZtxhy/sfrUix+hoKeVLqBYEWoxVK2Lk7wJTxl4JWD3dTM6z yXOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=jook3Mter+mu/IsDi8FJkIpq75c119SnjZStixDl33U=; b=xTHUrzGghsE+9TAugvBMqGKm5yVswfi95CmIUnTqNz7TbtuKYxYBJxsiNcbYMPNjsP 5iB0yPtFmnYtIFX/ZXte9kmRNf4tfAY8j+/AhASuOYjboXuL7G2DaJ6JBj5fw/vA2iYh YT4zdGr2X0l1ru8k78Zg3zHdU78QYCmnORCmV0Yomg0c8f468wgqrtAkdRCQGlKTTe/n lCffiSjl3kuaTy7YQv+CLY037sHv+9/0MhreylNMpQEyoEc1p2kaAnKrXSb3DSp8CWAw UM1oWHL9O3WqDsW07ZBLy21De8uZad/EDcGOyeTQ+h67hkTrq7oV/YLrt1VjGvEQkE6n +vfg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y3si89019eju.441.2020.12.02.06.51.43; Wed, 02 Dec 2020 06:52:08 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728690AbgLBOtC (ORCPT + 99 others); Wed, 2 Dec 2020 09:49:02 -0500 Received: from mx2.suse.de ([195.135.220.15]:57408 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727019AbgLBOtC (ORCPT ); Wed, 2 Dec 2020 09:49:02 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 37470AC6A; Wed, 2 Dec 2020 14:48:21 +0000 (UTC) Date: Wed, 2 Dec 2020 14:48:18 +0000 From: Mel Gorman To: "Li, Aubrey" Cc: Mel Gorman , kernel test robot , 0day robot , Vincent Guittot , Qais Yousef , Valentin Schneider , Jiang Biao , Tim Chen , LKML , lkp@lists.01.org, ying.huang@intel.com, feng.tang@intel.com, zhengjun.xing@intel.com, mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, Aubrey Li , yu.c.chen@intel.com Subject: Re: [sched/fair] 8d86968ac3: netperf.Throughput_tps -29.5% regression Message-ID: <20201202144818.GZ3306@suse.de> References: <20201125090923.GA3723@shao2-debian> <6fef3fc7-be18-92e5-c622-add6decb88c4@linux.intel.com> <20201126121351.GJ3371@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 02, 2020 at 10:29:59PM +0800, Li, Aubrey wrote: > > If the idle mask is not getting cleared then select_idle_cpu() is > > probably returning immediately. select_idle_core() is almost certainly > > failing so that just leaves select_idle_smt() to find a potentially idle > > CPU. That's a limited search space so tasks may be getting stacked and > > missing CPUs that are idling for short periods. > > Vincent suggested we decouple idle cpumask from short idle(stop tick) and > set it every time the CPU enters idle, I'll make this change in V6. > As a heads-up, I'm trying to prepare a series that alters the time complexity in general of select_idle_sibling(). It would tie into what you are doing with the idle cpumask tracking but would use it as a hint for CPUs to search first. It's still a WIP but I'm hoping to post something tomorrow. It would not replace your patch, just alter it a bit in terms of what happens just before select_idle_cpu(). > > > > On the flip side, I expect cases like hackbench to benefit because it > > can saturate a machine to such a degree that select_idle_cpu() is a waste > > of time. > > Yes, I believe that's also why I saw uperf/netperf improvement at high > load levels. > Yeah, hackbench is a case where SIS_AVG_CPU shines even though it does not help other cases. It throttles the search. In the series I'm working on right now, I simply kill SIS_AVG_CPU but might incorporate something like it into SIS_PROP as the last patch of the series as an RFC. > > > > That said, I haven't followed the different versions closely. I know v5 > > got a lot of feedback so will take a closer look at v6. Fundamentally > > though I expect that using the idle mask will be a mixed bag. At low > > utilisation or over-saturation, it'll be a benefit. At the point where > > the machine is almost fully busy, some workloads will benefit (lightly > > communicating workloads that occasionally migrate) and others will not > > (ping-pong workloads looking for CPUs that are idle for very brief > > periods). > > Do you have any interested workload [matrix] I can do the measurement? > Usually I go with a battery of tests from mmtests instead of one or two specifically to have a mix of wakeup timing, communication patterns and degrees of utilisation. The downside is that they take ages to run. > > It's tricky enough that it might benefit from a sched_feat() check that > > is default true so it gets tested. For regressions that show up, it'll > > be easy enough to ask for the feature to be disabled to see if it fixes > > it. Over time, that might give an idea of exactly what sort of workloads > > benefit and what suffers. > > Okay, I'll add a sched_feat() for this feature. > If the series I'm preparing works out ok and your patch can be integrated, the sched_feat() may not be necessary because your patch would further reduce time complexity without worrying about when the information gets reset. -- Mel Gorman SUSE Labs