Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3050340imm; Mon, 13 Aug 2018 05:15:53 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyb2OdohgV9Bp1aHBJIm4IT/vigcsQWCezW023tbn5iJ8qtP7Ba69qB3TVXm+5Jtxf3eUFN X-Received: by 2002:a17:902:5a08:: with SMTP id q8-v6mr16171857pli.300.1534162553428; Mon, 13 Aug 2018 05:15:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534162553; cv=none; d=google.com; s=arc-20160816; b=UUFC5Y/mCKhMdk0qnhIep6DCU0nMXanRjtzeNp9QwX6Fw9vBBXCdbbjxx8ebORzOPK EODKmfX3yI25Iv1BzGr/eVOhR+tCKEGaiyLhP4a/kikh6R4xXiAvR3FmPtOGchPugN5X Ndbjf98VTGgTve4kuvvo0zFGTehxV7uWaErFYStWI7d30VklH4VZIBK06XHEaO5mqQSt kIdjW0rJfFOgl8nm+5ogqry2JGkRLtjD/pqz4mMl+0loeorszhA7yk25gV2PfqYdfuSk HtTGewpFUVGeCtIPAYdCiGjF1Tcr+VHf5Juc7vVQ6/WrGpy8nqnE62xBH+BSF8nK1tEU oFQw== 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=zFsSQrEhIymGo7j0otpsgq2Ffkm4xXx5KRqvCWGMnjY=; b=jmM4zfY6eIoAHcwTSC+v4j2aC4FtlIWc98UdyUFNHPu2arBtpFt4wvnxY60f3pc5VF PQhPiI8sAcV0QKmxoJ3+rurU23Nj1jtgt5c79eKRctuoNPfBxq+uyKp3MCDBX5TnhZij AdpgrX5W3GDZrzMlVfVYVnmS0X6CGw+A17J2KHceCtyZOYfAQkSMH6LlQOVImevKgmeK R8rpEuDuyFZOAKByF4n+iNU5Ep/B9s39eL+XKaC/p6jvvOocHAovvrL4uZ0UE5dhPjjn Nw0VWxaLkTNzWgfn4spnvXc0nXzrk7L4rVTz0sIVimXICg4P+gvz7ymSM7vlRD+PLuoc RpNQ== 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 d40-v6si13953796pla.217.2018.08.13.05.15.37; Mon, 13 Aug 2018 05:15:53 -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; 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 S1729667AbeHMO4s (ORCPT + 99 others); Mon, 13 Aug 2018 10:56:48 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:57840 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729418AbeHMO4s (ORCPT ); Mon, 13 Aug 2018 10:56:48 -0400 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 74FB818A; Mon, 13 Aug 2018 05:14:46 -0700 (PDT) Received: from e110439-lin (e110439-lin.Emea.Arm.com [10.4.12.126]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C9C3B3F5D0; Mon, 13 Aug 2018 05:14:43 -0700 (PDT) Date: Mon, 13 Aug 2018 13:14:41 +0100 From: Patrick Bellasi To: Juri Lelli Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Ingo Molnar , Peter Zijlstra , Tejun Heo , "Rafael J . Wysocki" , Viresh Kumar , Vincent Guittot , Paul Turner , Dietmar Eggemann , Morten Rasmussen , Todd Kjos , Joel Fernandes , Steve Muckle , Suren Baghdasaryan Subject: Re: [PATCH v3 01/14] sched/core: uclamp: extend sched_setattr to support utilization clamping Message-ID: <20180813121441.GC2605@e110439-lin> References: <20180806163946.28380-1-patrick.bellasi@arm.com> <20180806163946.28380-2-patrick.bellasi@arm.com> <20180807095905.GB2288@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180807095905.GB2288@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 07-Aug 11:59, Juri Lelli wrote: > Hi, > > Minor comments below. > > On 06/08/18 17:39, Patrick Bellasi wrote: > > [...] > > > + * > > + * Task Utilization Attributes > > + * =========================== > > + * > > + * A subset of sched_attr attributes allows to specify the utilization which > > + * should be expected by a task. These attributes allows to inform the > ^ > allow > > > + * scheduler about the utilization boundaries within which is safe to schedule > > Isn't all this more about providing hints than safety? Yes, it's "just" hints... will rephrase to make it more clear. > > + * the task. These utilization boundaries are valuable information to support > > + * scheduler decisions on both task placement and frequencies selection. > > + * > > + * @sched_util_min represents the minimum utilization > > + * @sched_util_max represents the maximum utilization > > + * > > + * Utilization is a value in the range [0..SCHED_CAPACITY_SCALE] which > > + * represents the percentage of CPU time used by a task when running at the > > + * maximum frequency on the highest capacity CPU of the system. Thus, for > > + * example, a 20% utilization task is a task running for 2ms every 10ms. > > + * > > + * A task with a min utilization value bigger then 0 is more likely to be > > + * scheduled on a CPU which can provide that bandwidth. > > + * A task with a max utilization value smaller then 1024 is more likely to be > > + * scheduled on a CPU which do not provide more then the required bandwidth. > > Isn't s/bandwidth/capacity/ here, above, and in general where you use > the term "bandwidth" more appropriate? I wonder if overloading this term > (w.r.t. how is used with DEADLINE) might create confusion. In this case > we are not providing any sort of guarantees, it's a hint. Yes, you right... here we are not really granting any bandwidth but just "improving" the bandwidth provisioning by hinting the scheduler about a certain min/max capacity required. The problem related to using capacity is that, from kernel space, capacity is defined as a static quantity/property of CPUs. Still, I think it makes sense to argue that util_{min,max} are hints on the min/max capacity required for a task. I'll update comments and text to avoid using bandwidth in favour of capacity. Cheers Patrick -- #include Patrick Bellasi