Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp108052ybx; Wed, 30 Oct 2019 12:05:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqzfMULHxQmm8Iz57lMKCyzzVpuCKajsN/SMQTkEgJzpJZuLgjS/c1kPEQcAD1Lk0RUlZ2K3 X-Received: by 2002:a05:6402:213:: with SMTP id t19mr1439904edv.7.1572462354926; Wed, 30 Oct 2019 12:05:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572462354; cv=none; d=google.com; s=arc-20160816; b=eu9ZQcQKcfQtCKFlScw/IC+Q3Inp/TotWbeaxSrdUf3cj6YEhyhsT/wh3pv/hy9hTl zZW44CmiwhMlrzW5xo/ixhuey7rYJqi6VJQ7jRYmA2kn8/Mt3jviGHqOsnmbkO17gIwx oDhNE8D9Nq1Z6VT/SoXnqtJoah9jJEZCx3dLdsNICfWJvHteZOOD04ozFWc0iLSfk3fJ 65dxlBPnDbnhs8tT77AAVpoSmCNQ+RY2ffoeg90zqudScAUGl2awDI8QbAwB0p5CnUGE obgETIcSC7BRMS6PjlAD640E2lp+dxZodzzoN7dxZjfIV3FsDGUygMe8dovwSDfHsFJB k6ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:user-agent:in-reply-to:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=jNO/CUUGCo/7bROHXKMU3mQ4pgifuylbmZ7CpRkXffI=; b=VkwakQ/9NNy/73/LzlwnUgQ0ltBR8/ilzEWeUbIePHC/vajUo7Nf2A4qyzDcD7Z+pD rKqoyykubgh2xIpKbcceRug2JOiQBVyFXctNbcP8ObWvELbxmLmMflnC3Yj/Oi3NY8jv a6wRzzxTlBxdvb0XeW5KnMffqHI9SK++F6tihPl5C61TBMEK8Rjf1DuNJKY3pAF/330G gz1FCLMBs354/FsOE5pTk5UGwaOmER0Ic1DHDHoP1JFI0zYHpoOvn1fdEUfglv19KJWn eNol1e6eT/ToCtah2B/mJd5IzvhkmN2QYBiipSGAHlhk/XGQM19yC9Bm264cUQMMn6Hi MWZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="X2w0T/n9"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g28si2218193edg.327.2019.10.30.12.05.31; Wed, 30 Oct 2019 12:05:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="X2w0T/n9"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727272AbfJ3RpB (ORCPT + 99 others); Wed, 30 Oct 2019 13:45:01 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:51211 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727112AbfJ3RpB (ORCPT ); Wed, 30 Oct 2019 13:45:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572457500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jNO/CUUGCo/7bROHXKMU3mQ4pgifuylbmZ7CpRkXffI=; b=X2w0T/n9wCyjMfUb+SbhfYxk86RU6flmwBZ/G5+ZbynzCuS/w7XNbvWA2Wg57z7tU69baa /6teyuCcQ7eYdhH0cCl6IgnrsGjcL0ygVJ39fcj2VZ8VkeO1Je9V/G58IoB4O8KAYUPLh5 j9xUAuCOu9+irtM0vEErLUoVJVhEo1E= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-313-FTdKIhYkOrifUHVxTwYiRQ-1; Wed, 30 Oct 2019 13:44:45 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EC9A2107ACC0; Wed, 30 Oct 2019 17:44:43 +0000 (UTC) Received: from pauld.bos.csb (dhcp-17-51.bos.redhat.com [10.18.17.51]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 409F219757; Wed, 30 Oct 2019 17:44:42 +0000 (UTC) Date: Wed, 30 Oct 2019 13:44:40 -0400 From: Phil Auld To: Vincent Guittot Cc: Valentin Schneider , Dietmar Eggemann , Ingo Molnar , Mel Gorman , linux-kernel , Ingo Molnar , Peter Zijlstra , Srikar Dronamraju , Quentin Perret , Morten Rasmussen , Hillf Danton , Parth Shah , Rik van Riel Subject: Re: [PATCH v4 00/10] sched/fair: rework the CFS load balance Message-ID: <20191030174440.GI1686@pauld.bos.csb> References: <20191024123844.GB2708@pauld.bos.csb> <20191024134650.GD2708@pauld.bos.csb> <20191025133325.GA2421@pauld.bos.csb> <20191030143937.GC1686@pauld.bos.csb> <564ca629-5c34-dbd1-8e64-2da6910b18a3@arm.com> <20191030171914.GF1686@pauld.bos.csb> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: FTdKIhYkOrifUHVxTwYiRQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 30, 2019 at 06:28:50PM +0100 Vincent Guittot wrote: > On Wed, 30 Oct 2019 at 18:19, Phil Auld wrote: > > > > Hi, > > > > On Wed, Oct 30, 2019 at 05:35:55PM +0100 Valentin Schneider wrote: > > > > > > > > > On 30/10/2019 17:24, Dietmar Eggemann wrote: > > > > On 30.10.19 15:39, Phil Auld wrote: > > > >> Hi Vincent, > > > >> > > > >> On Mon, Oct 28, 2019 at 02:03:15PM +0100 Vincent Guittot wrote: > > > > > > > > [...] > > > > > > > >>>> When you say slow versus fast wakeup paths what do you mean? I'm= still > > > >>>> learning my way around all this code. > > > >>> > > > >>> When task wakes up, we can decide to > > > >>> - speedup the wakeup and shorten the list of cpus and compare onl= y > > > >>> prev_cpu vs this_cpu (in fact the group of cpu that share their > > > >>> respective LLC). That's the fast wakeup path that is used most of= the > > > >>> time during a wakeup > > > >>> - or start to find the idlest CPU of the system and scan all doma= ins. > > > >>> That's the slow path that is used for new tasks or when a task wa= kes > > > >>> up a lot of other tasks at the same time > > > > > > > > [...] > > > > > > > > Is the latter related to wake_wide()? If yes, is the SD_BALANCE_WAK= E > > > > flag set on the sched domains on your machines? IMHO, otherwise tho= se > > > > wakeups are not forced into the slowpath (if (unlikely(sd))? > > > > > > > > I had this discussion the other day with Valentin S. on #sched and = we > > > > were not sure how SD_BALANCE_WAKE is set on sched domains on > > > > !SD_ASYM_CPUCAPACITY systems. > > > > > > > > > > Well from the code nobody but us (asymmetric capacity systems) set > > > SD_BALANCE_WAKE. I was however curious if there were some folks who s= et it > > > with out of tree code for some reason. > > > > > > As Dietmar said, not having SD_BALANCE_WAKE means you'll never go thr= ough > > > the slow path on wakeups, because there is no domain with SD_BALANCE_= WAKE for > > > the domain loop to find. Depending on your topology you most likely w= ill > > > go through it on fork or exec though. > > > > > > IOW wake_wide() is not really widening the wakeup scan on wakeups usi= ng > > > mainline topology code (disregarding asymmetric capacity systems), wh= ich > > > sounds a bit... off. > > > > Thanks. It's not currently set. I'll set it and re-run to see if it mak= es > > a difference. >=20 > Because the fix only touches the slow path and according to Valentin > and Dietmar comments on the wake up path, it would mean that your UC > creates regularly some new threads during the test ? >=20 I believe it is not creating any new threads during each run.=20 > > > > > > However, I'm not sure why it would be making a difference for only the = cgroup > > case. If this is causing issues I'd expect it to effect both runs. > > > > In general I think these threads want to wake up the last cpu they were= on. > > And given there are fewer cpu bound tasks that CPUs that wake cpu shoul= d, > > more often than not, be idle. > > > > > > Cheers, > > Phil > > > > > > > > -- > > --=20