Received: by 10.223.164.202 with SMTP id h10csp158768wrb; Thu, 30 Nov 2017 08:20:30 -0800 (PST) X-Google-Smtp-Source: AGs4zMabHUdIcSfD0026ZQet9NOgQUfPnZVteyr+kN1FC64JvkHgq4rHaXKoLT8s2odoh0dz5JOU X-Received: by 10.84.253.1 with SMTP id z1mr3143377pll.115.1512058830754; Thu, 30 Nov 2017 08:20:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512058830; cv=none; d=google.com; s=arc-20160816; b=kVlO0wQOuASlIAXrsrJ4Z5Ipm73dZoOzy8qN7mc6FRtZYSeJPi+JcqLOz4ZpmvKqmt kB6lYzFffuNPLQmQqOloAzuqxqE172W9a9861ldmPIyjmEXeJxrB9kM/qZkBKpgILKRG 4lz+MpELpmGtqOhT+WYGqVih6gIAvb1cKW78JqQpSYWoHjSOK5mZZgpfbi5z+LjK0pX8 7I3FcXl2vcQBFwCQguNzjwlASG4y3p1K1F1xuaMY56z6OYKQ96g0oGJIHne9bOJmekyu dgJ2t8lGZSRn5wBRijcL+kowsIRUCwmvs/Hi5VGa7r3aXZL8x9haMldPdCPGt1dXXdfx jQ2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=aRowB1MilXgJBB7Xb7Wthrqqv31nlqaSkWSNV2HOZ+I=; b=kRR+nKNx0Zcl+fXAZ0svkGrZkWjdg3rm5nAYrF7lPjPvtjXEmCXbOXeEyCJWIGWLzq IHYFZ66sRYdAk+OpCkGJ9Gxt8rXxzNKyp4bF1YAsQLfNQVqFphVyzw/sZ3UBaIdU3Y4m pxIW58i1t37h94Aev0BfA995FkLw1bX1e7jSzYZh34P9BxUIE7TCJTx2OMsQZ6KdxNQL dCCOifU1s7cDUbLv4PvT68COeHITGs1OEPa9viXv88215uacDmw1JmeCMuE2bN1Jv6rO 5tP6bFvTzgAOdTC2EMi1TLIZ2JH/Wbzv45AkuaiBsF2tTlLjz4+/DXUxN23R1sLhLKm9 o7qg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a33si3387568plc.187.2017.11.30.08.20.15; Thu, 30 Nov 2017 08:20:30 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753178AbdK3QTJ (ORCPT + 99 others); Thu, 30 Nov 2017 11:19:09 -0500 Received: from foss.arm.com ([217.140.101.70]:57028 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753127AbdK3QTI (ORCPT ); Thu, 30 Nov 2017 11:19:08 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F3F5A1529; Thu, 30 Nov 2017 08:19:07 -0800 (PST) Received: from e110439-lin (e110439-lin.cambridge.arm.com [10.1.210.68]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E021F3F318; Thu, 30 Nov 2017 08:19:05 -0800 (PST) Date: Thu, 30 Nov 2017 16:19:01 +0000 From: Patrick Bellasi To: Juri Lelli Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Ingo Molnar , Peter Zijlstra , "Rafael J . Wysocki" , Viresh Kumar , Vincent Guittot , Dietmar Eggemann , Morten Rasmussen , Todd Kjos , Joel Fernandes Subject: Re: [PATCH v3 1/6] cpufreq: schedutil: reset sg_cpus's flags at IDLE enter Message-ID: <20171130161859.GH31247@e110439-lin> References: <20171130114723.29210-1-patrick.bellasi@arm.com> <20171130114723.29210-2-patrick.bellasi@arm.com> <20171130131222.GA9903@localhost.localdomain> <20171130154111.GC31247@e110439-lin> <20171130160205.GH9903@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171130160205.GH9903@localhost.localdomain> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30-Nov 17:02, Juri Lelli wrote: > On 30/11/17 15:41, Patrick Bellasi wrote: > > On 30-Nov 14:12, Juri Lelli wrote: > > > Hi, > > > > > > On 30/11/17 11:47, Patrick Bellasi wrote: > > > > > > [...] > > > > > > > diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c > > > > index 2f52ec0f1539..67339ccb5595 100644 > > > > --- a/kernel/sched/cpufreq_schedutil.c > > > > +++ b/kernel/sched/cpufreq_schedutil.c > > > > @@ -347,6 +347,12 @@ static void sugov_update_shared(struct update_util_data *hook, u64 time, > > > > > > > > sg_cpu->util = util; > > > > sg_cpu->max = max; > > > > + > > > > + /* CPU is entering IDLE, reset flags without triggering an update */ > > > > + if (unlikely(flags & SCHED_CPUFREQ_IDLE)) { > > > > + sg_cpu->flags = 0; > > > > + goto done; > > > > + } > > > > > > Looks good for now. I'm just thinking that we will happen for DL, as a > > > CPU that still "has" a sleeping task is not going to be really idle > > > until the 0-lag time. > > > > AFAIU, for the time being, DL already cannot really rely on this flag > > for its behaviors to be correct. Indeed, flags are reset as soon as > > a FAIR task wakes up and it's enqueued. > > Right, and your flags ORing patch should help with this. > > > > > Only once your DL integration patches are in, we do not depends on > > flags anymore since DL will report a ceratain utilization up to the > > 0-lag time, isn't it? > > Utilization won't decrease until 0-lag time, correct. Then IMO with your DL patches the DL class don't need the flags anymore since schedutil will know (and account) for the utlization required by the DL tasks. Isn't it? > I was just wondering if resetting flags before that time (when a CPU > enters idle) might be an issue. If the above is correct, then flags will be used only for the RT class (and IO boosting)... and thus this patch will still be useful as it is now: meaning that once the idle task is selected we do not care anymore about RT and IOBoosting (only). > > If that's the case, I would say that the flags will be used only to > > jump to the max OPP for RT tasks. Thus, this patch should still be valid. > > > > > I guess we could move this at that point in time? > > > > Not sure what you mean here. Right now the new SCHED_CPUFREQ_IDLE flag > > is notified only by idle tasks. That's the only code path where we are > > sure the CPU is entering IDLE. > > > > W.r.t. the possible issue above, I was thinking that we might want to > reset flags at 0-lag time for DL (if CPU is still idle). Anyway, two > distinct set of patches. Who gets in last will have to ponder the thing > a little bit more. :) Perhaps I'm still a bit confused but, to me, it seems that with your patches we completely fix DL but we still can use this exact same patch just for RT tasks. > Best, > > Juri -- #include Patrick Bellasi From 1585507552627917498@xxx Thu Nov 30 16:03:51 +0000 2017 X-GM-THRID: 1585491492414219974 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread