Received: by 10.213.65.68 with SMTP id h4csp4336111imn; Tue, 10 Apr 2018 13:12:35 -0700 (PDT) X-Google-Smtp-Source: AIpwx49nkPS1zt4WP3Uei1ACQT2Igfmkk30K3qQ9yV8h3k+qDm2aDvVWFwIxHidpYOl7ex2zM6ou X-Received: by 10.99.120.138 with SMTP id t132mr1299384pgc.280.1523391155721; Tue, 10 Apr 2018 13:12:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523391155; cv=none; d=google.com; s=arc-20160816; b=ateLAkf1k4tVKjk0nFZIxaYuPWOr2NcDrDn15Gva3gugheXpthF4vZO/QjWE0tf/0R 0ee8ogU9qcsXgYLBCnRAfOSkid1JYM5k5qRPwdpzE69N1kIS1DeGLJgmyJ+1lCn/4XIX Ai8cakhIQz1woEPpUxC4HpnN2BZI33K6lXxgY4Ibt6mxIDXw66tOY1fqSejqEOHt5VJE Q3E+A9Aeolnm/BXabtd3VmvI47qz/ujkfGuz/nAVtsLaKwMecxHK50GYlrHgIvXQKsw/ yElR9G5qOmwFg5HoxBx195M97upRPstv89hYu8SP1RqDPOIS6np8FQ4qVoNEvgo75ufH nFjQ== 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:dkim-signature:arc-authentication-results; bh=f8uvklyaU0MxFzvZWgPKSGgxq8fAhQEOEk7o5+C1Fg0=; b=uSNgui6LbJ1a363WVmtQUlmk/xVrskeppEPPKZwLuHEy1buQn9zKZ7r1eJmqbbwiI9 s/z02ripUIFEN68CrXClANaZooDq1gMY9S7EYgNBQ0cQ1HyhQjWrSeEmkqITn1M9Ts6X PI8AAx3m4nk9AH4Myi3MfNnKn1IVY/QdushFXIogMKVqit0izbCycsmZKqnTyn81B2An QvibtUFYnK96oyn/b3abDvTbGhJ19/0fX+GbTo59I6qGh1aF36LwP9Qwhws54HvfVWMs o/68lQOwfxuTVNpKlSedEwVZ+J7MVRMPk00PWapEoHQkZrqlboSUoJeMTwWtvcsCszsZ TwJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=LnoKlrNW; 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 67si2621231pfr.239.2018.04.10.13.11.58; Tue, 10 Apr 2018 13:12:35 -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=fail header.i=@gmail.com header.s=20161025 header.b=LnoKlrNW; 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 S1753189AbeDJUFU (ORCPT + 99 others); Tue, 10 Apr 2018 16:05:20 -0400 Received: from mail-yb0-f171.google.com ([209.85.213.171]:34755 "EHLO mail-yb0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751629AbeDJUFR (ORCPT ); Tue, 10 Apr 2018 16:05:17 -0400 Received: by mail-yb0-f171.google.com with SMTP id b14-v6so3092468ybk.1; Tue, 10 Apr 2018 13:05:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=f8uvklyaU0MxFzvZWgPKSGgxq8fAhQEOEk7o5+C1Fg0=; b=LnoKlrNWBlZQ12zzlh8frpwGDSbLyDcyB/dqmH1GkFIyz5DrCTdhfcLAyyzcqsoF9T E1bXGEySwdvPZPWCigwPBkWd2K42xCqIpBlhN2bmvVscCUGicQhGq/lVO4DewDQ/Sn5T 22kMYyYkNyRanfBUyzrVhCKZ5X2PtSBa7ovth45q58LhZHMEy5YA9B0gCDIHhl8sOPgy zgg1wJRdxxNtqZazvSgmpzlF/RiUC/6gCTn/j/eYS3Wp1EeT4ahoPj1F07z9zKq3EtkE qimjwIKM00ZpO90VYanhEAa3z8Wb4zCWH/BCs4luZXJ5bXrOWduQ5lOe30C0IYlecJj7 ejBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=f8uvklyaU0MxFzvZWgPKSGgxq8fAhQEOEk7o5+C1Fg0=; b=trlzNHIcgU+uuVxjHcFaqDefMt4C2AET+oKF6wv7GPUkSDJexzkBm6AJGU86LGuTVy dsK1kmm7z8HBV8iVE6Hy9Rpm8RpdYwzZAXjnDceyIK6HNRJeK3MsbZsu7gFOybCzw33S WHWx3b1gJIaZQsLvEmA1VZwdi6b02oaFyJEJa/LCMoXWlZBTDxHSWlWEXT+LJfGFXL0v WzyULtLsahJFTV839ZIhpVASXLq9GYQg3b4bfLSr2RkjlnarrAPxhxI+/FV2bHbIoHGb e4BrE0bhus6RN1P0ZONSruY9HZb8VBJyluYzvsZOKHc6xNut6+1vfnVH3Dmf6eqQHw3y eioA== X-Gm-Message-State: ALQs6tD5aY483d1zHvgDXzIiHsQl2qrOXaTYv9vpUR+AB/0a46JgC9r7 PplTUnfZCym1LG0sexo/21A= X-Received: by 2002:a25:4e83:: with SMTP id c125-v6mr1127871ybb.17.1523390716713; Tue, 10 Apr 2018 13:05:16 -0700 (PDT) Received: from localhost ([2620:10d:c091:180::1:f676]) by smtp.gmail.com with ESMTPSA id e187sm1447172ywb.23.2018.04.10.13.05.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 13:05:15 -0700 (PDT) Date: Tue, 10 Apr 2018 13:05:14 -0700 From: Tejun Heo To: Patrick Bellasi Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Ingo Molnar , Peter Zijlstra , "Rafael J . Wysocki" , Viresh Kumar , Vincent Guittot , Paul Turner , Dietmar Eggemann , Morten Rasmussen , Juri Lelli , Joel Fernandes , Steve Muckle Subject: Re: [PATCH 4/7] sched/core: uclamp: add utilization clamping to the CPU controller Message-ID: <20180410200514.GA793541@devbig577.frc2.facebook.com> References: <20180409165615.2326-1-patrick.bellasi@arm.com> <20180409165615.2326-5-patrick.bellasi@arm.com> <20180409222417.GK3126663@devbig577.frc2.facebook.com> <20180410171612.GJ14248@e110439-lin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180410171612.GJ14248@e110439-lin> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Tue, Apr 10, 2018 at 06:16:12PM +0100, Patrick Bellasi wrote: > > I'm not too enthusiastic about util_min/max given that it can easily > > be read as actual utilization based bandwidth control when what's > > actually implemented, IIUC, is affecting CPU frequency selection. > > Right now we are basically affecting the frequency selection. > However, the next step is to use this same interface to possibly bias > task placement. > > The idea is that: > > - the util_min value can be used to possibly avoid CPUs which have > a (maybe temporarily) limited capacity, for example, due to thermal > pressure. > > - a util_max value can use used to possibly identify tasks which can > be co-scheduled together in a (maybe) limited capacity CPU since > they are more likely "less important" tasks. > > Thus, since this is a new user-space API, we would like to find a > concept which is generic enough to express the current requirement but > also easily accommodate future extensions. I'm not sure we can overload the meanings like that on the same interface. Right now, it doesn't say anything about bandwidth (or utilization) allocation. It just limits the frequency range the particular cpu that the task ended up on can be in and what you're describing above is the third different thing. It doesn't seem clear that they're something which can be overloaded onto the same interface. > > Maybe something like cpu.freq.min/max are better names? > > IMO this is something too much platform specific. > > I agree that utilization is maybe too much an implementation detail, > but perhaps this can be solved by using a more generic range. > > What about using values in the [0..100] range which define: > > a percentage of the maximum available capacity > for the CPUs in the target system > > Do you think this can work? Yeah, sure, it's more that right now the intention isn't clear. A cgroup control knob which limits cpu frequency range while the cgroup is on a cpu is a very different thing from a cgroup knob which restricts what tasks can be scheduled on the same cpu. They're actually incompatible. Doing the latter actively breaks the former. > > This is a problem which exists for all other interfaces. For > > historical and other reasons, at least till now, we've opted to put > > everything at system level outside of cgroup interface. We might > > change this in the future and duplicate system-level information and > > interfaces in the root cgroup but we wanna do that in a more systemtic > > fashion than adding an one-off knob in the cgroup root. > > I see, I think we can easily come up with a procfs/sysfs interface > usable to define system-wide values. > > Any suggestion for something already existing which I can use as a > reference? Most system level interfaces are there with a long history and things aren't that consistent. One route could be finding an interface implementing a nearby feature and staying consistent with that. > > Tying creation / config operations to the config propagation doesn't > > work well with delegation and is inconsistent with what other > > controllers are doing. For cases where the propagated config being > > visible in a sub cgroup is necessary, please add .effective files. > > I'm not sure to understand this point: you mean that we should not > enforce "consistency rules" among parent-child groups? You should. It just shouldn't make configurations fail cuz that ends up breaking delegations. > I have to look better into this "effective" concept. > Meanwhile, can you make a simple example? There's a recent cpuset patchset posted by Waiman Long. Googling for lkml cpuset and Waiman Long should find it easily. > > > Tasks on a subgroup can only be more boosted and/or capped, which is > > > > Less boosted. .low at a parent level must set the upper bound of .low > > that all its descendants can have. > > Is that a mandatory requirement? Or based on a proper justification > you can also accept what I'm proposing? > > I've always been more of the idea that what I'm proposing could make > more sense for a general case but perhaps I just need to go back and > better check the use-cases we have on hand to see if it's really > required or not. Yeah, I think we want to stick to that semantics. That's what memory controller does and it'd be really confusing to flip the directions on different controllers. Thanks. -- tejun