Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6902805ybi; Wed, 5 Jun 2019 08:08:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqwPmfH+ljuJxJcbJa7GL3l3qLRtEXLQUKLLRRktQM3Whv8acWmFkHxIYq4nFZr9YYE4X+Y4 X-Received: by 2002:a17:90a:9291:: with SMTP id n17mr44168134pjo.66.1559747302326; Wed, 05 Jun 2019 08:08:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559747302; cv=none; d=google.com; s=arc-20160816; b=krC4N5uOsTit9xBitrOVeRDe7C+rBdzlAvcJFKk76AWutlazu2k+n6lbcLz7vc8GMi 87WtiAMoO+1e+i3J1piyO9+buJxJdE+Kmik8UAWmzRtvYa4RjtrCAj442MnnYQ+1CUVh 0LE2TSXF5WmTHlSQHFW2yOdXkF+rL/cQWPhmmWRDjulzHZUvD/NgfEvSt/cJDBYbh4o2 oRY7QLJvbu8osTJV5FUU42JKcFBpmhzpcpFRs9LLNKotOaffOfQKlQygOCInSmk/XDPu oun4+hEj/SmqwIZ9zo7o0daNnDNGtUsEr/35pVcfyEiRTX7x0T0ggo7EQEcsZAQ4b6oU qDqA== 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; bh=uCln/v2SPB/uzJYGPH3wpcaTzsG/GJMtvgFUR8jEnVs=; b=yL68H7yik2iGmjt8aDlZr6cZ3Q33k6WCIqzcmGmHXrGBCm3D9P5LJx6rXC0Rnl6C4J C7R+A9r2K5jyPMPSikm0N0/wNhjlaWIshKyucqm04GYkOf1h6TIjuLT+3UtvngDlASnM UjD18IeUC8NovLA9w6aItWiqFtLKpriJ2e1u3q7YMnljFvCVDit+77NTE9twOMGPbDJ/ lOuA6h9aH8rO3qGNhMYY7iS1SchxruI0VRo5VBrsZGbc8aO5kAsjbakjQg/+xWPEk5AX UwmKxJ7N5B+jhc7bvX1x5rMB5tGnX86AEJfJs1bRVmi+H+QrUkwlPBeGix2z1Sr1HpP1 +2aQ== 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 y62si1767337pfy.244.2019.06.05.08.08.02; Wed, 05 Jun 2019 08:08:22 -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 S1728533AbfFEPGh (ORCPT + 99 others); Wed, 5 Jun 2019 11:06:37 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:33090 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728280AbfFEPGg (ORCPT ); Wed, 5 Jun 2019 11:06:36 -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 5C82B374; Wed, 5 Jun 2019 08:06:36 -0700 (PDT) Received: from e110439-lin (e110439-lin.cambridge.arm.com [10.1.194.43]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5A32C3F246; Wed, 5 Jun 2019 08:06:33 -0700 (PDT) Date: Wed, 5 Jun 2019 16:06:30 +0100 From: Patrick Bellasi To: Tejun Heo Cc: Peter Zijlstra , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-api@vger.kernel.org, Ingo Molnar , "Rafael J . Wysocki" , Vincent Guittot , Viresh Kumar , Paul Turner , Quentin Perret , Dietmar Eggemann , Morten Rasmussen , Juri Lelli , Todd Kjos , Joel Fernandes , Steve Muckle , Suren Baghdasaryan Subject: Re: [PATCH v9 12/16] sched/core: uclamp: Extend CPU's cgroup controller Message-ID: <20190605150630.vh5pyfpd6y3mfcaa@e110439-lin> References: <20190515094459.10317-1-patrick.bellasi@arm.com> <20190515094459.10317-13-patrick.bellasi@arm.com> <20190531153545.GE374014@devbig004.ftw2.facebook.com> <20190603122929.GC19426@darkstar> <20190605140943.GM374014@devbig004.ftw2.facebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190605140943.GM374014@devbig004.ftw2.facebook.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05-Jun 07:09, Tejun Heo wrote: > Hello, Hi, > On Mon, Jun 03, 2019 at 01:29:29PM +0100, Patrick Bellasi wrote: > > On 31-May 08:35, Tejun Heo wrote: > > > Hello, Patrick. > > > > > > On Wed, May 15, 2019 at 10:44:55AM +0100, Patrick Bellasi wrote: > > > > [...] > > > > > For proportions (as opposed to weights), we use percentage rational > > > numbers - e.g. 38.44 for 38.44%. I have parser and doc update commits > > > pending. I'll put them on cgroup/for-5.3. > > > > That's a point worth discussing with Peter, we already changed one > > time from percentages to 1024 scale. > > cgroup tries to uss uniform units for its interface files as much as > possible even when that deviates from non-cgroup interface. We can > bikeshed the pros and cons for that design choice for sure but I don't > think it makes sense to deviate from that at this point unless there > are really strong reasons to do so. that makes sense to me, having a uniform interface has certainly a value. The only additional point I can think about as a (slightly) stronger reason is that I guess we would like to have the same API for cgroups as well as for the task specific and the system wide settings. The task specific values comes in via the sched_setattr() syscall: [PATCH v9 06/16] sched/core: uclamp: Extend sched_setattr() to support utilization clamping https://lore.kernel.org/lkml/20190515094459.10317-7-patrick.bellasi@arm.com/ where we need to encode each clamp into a __u32 value. System wide settings are expose similarly to these: grep '' /proc/sys/kernel/sched_* where we have always integer numbers. AFAIU your proposal will require to use a "scaled percentage" - e.g. 3844 for 38.44% which however it's still not quite the same as writing the string "38.44". Not sure that's a strong enough argument, is it? > > Utilization clamps are expressed as percentages by definition, > > they are just expressed in a convenient 1024 scale which should not be > > alien to people using those knobs. > > > > If we wanna use a "more specific" name like uclamp.{min,max} then we > > should probably also accept to use a "more specific" metric, don't we? > > Heh, this actually made me chuckle. :) > It's an interesting bargaining take but I don't think that same word > being in two different places makes them tradable entities. Sure, that was not my intention. I was just trying to see if the need to be more specific could be an argument for having also a more specific value. > We can go into the weeds with the semantics but how about us using > an alternative adjective "misleading" for the cpu.util.min/max names > to short-circuit that? Not quite sure to get what you mean here. Are you pointing out that with clamps we don't strictly enforce a bandwidth but we just set a bias? Cheers, Patrick -- #include Patrick Bellasi