Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3149118imu; Wed, 7 Nov 2018 05:58:56 -0800 (PST) X-Google-Smtp-Source: AJdET5fJZHS/73/f3TfakVYhqfy31KwfaXEoTcr3bJLxNw2mZMQeMvz/cU1DKvWZP6SLy52AlpGp X-Received: by 2002:a62:da54:: with SMTP id w20-v6mr330047pfl.106.1541599136528; Wed, 07 Nov 2018 05:58:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541599136; cv=none; d=google.com; s=arc-20160816; b=ILNW64pqzPewtYpLZLuBllArMLea0zvB+21dteNkZgqlVvu7F30A1NMbayrc0wtmpm 6aG0QPk139NCItWrgEDAx/9ZuruiuHqu80F2KhFjet0YRkOpB6H6Sy0842tNvqRV0ngX CLOGoRSXaiU3d+o/6+kBPIXTd6ejeWFje7Mz08X3K1VbYJ94LoU6QsFJSG+JOcT0vSss ZrU0/x4hYdUznzga20xxLuZ5yKOhvG35x68iAdAbrkWnf+0P596aHegZkt8r5aeCIe1Z zeLRRBECtcJIv9Q6kQ8zopA5gcUiz0RnXjkizNukBwfzAXN7U56XwDRd1d+pFfmfuyxe Aw3Q== 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; bh=EltP8ilXjkv36t1bw1TG5a0Czq2nBHXdy4S7Z15GOtE=; b=KgQhXYRaGwJY7FtuBW1SbrH5TsWlzM30cxsQExkXskoGggrSe1Sdm6kEIV520Vwrzg 03B/eHTjrTAP4Lqt7Ew5Ivf4yhYaviTF0/0n8wSkk1MoGV22OGVc6h6DDw7uvKLSVLSx AFXZLk4jRxMAXH8JvvFle//lr8yd1AR8Xbzu5W7XnG769I+qrzI1KKO40D3N35/Shmd6 buyeDViGsvI2g+dUEsUy5P7aVa6mBvuxNJcLU4FJOiKbqtwzoxnTC7sjDU8y//GGntz4 cCOLTHEZmeY2wBiqqFiJCsp1msD+uJ0S/0kug5KaR9Ky6YhEHycdO1VVmNfokzpAlTXP eqag== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b="SxUv/afP"; 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 h20-v6si734109plr.343.2018.11.07.05.58.42; Wed, 07 Nov 2018 05:58:56 -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; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b="SxUv/afP"; 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 S1730618AbeKGX2k (ORCPT + 99 others); Wed, 7 Nov 2018 18:28:40 -0500 Received: from merlin.infradead.org ([205.233.59.134]:60982 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727168AbeKGX2k (ORCPT ); Wed, 7 Nov 2018 18:28:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=EltP8ilXjkv36t1bw1TG5a0Czq2nBHXdy4S7Z15GOtE=; b=SxUv/afPVdYpf1ZVY+PTm0CeM RFSwfZgn0sDUHzEGnNMZaiK2fj+0vm9K1vBLZHM7zx3DLaomdkT/DRIqzc+RzbPwEdghwWmJK3ql2 vZhnlBFbHT3qxv5zxlL0JmI35lttZHhuIHs0069DLIZR2zlaue8zTi9fu7EMvKoBgSY9qwBK+onNn KBwLtEIt6/VOLhV7cpgOPshA6xpvWjs+iL24OvHr7fP/YCbdVFFu5zfqalMLeb2pZFQ240oywqmTq Vx5P3IH1EXxFQRxvsP59qTd6APaABQjB7N45c2itL+qLr6qVnKli88lEJkyef4tcft+VwDv7GoCgs vIUiUOiXQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gKOLL-00068w-Te; Wed, 07 Nov 2018 13:58:04 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id C03302029F883; Wed, 7 Nov 2018 14:58:01 +0100 (CET) Date: Wed, 7 Nov 2018 14:58:01 +0100 From: Peter Zijlstra To: Patrick Bellasi Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Ingo Molnar , Tejun Heo , "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 , linux-api@vger.kernel.org Subject: Re: [PATCH v5 02/15] sched/core: make sched_setattr able to tune the current policy Message-ID: <20181107135801.GE9761@hirez.programming.kicks-ass.net> References: <20181029183311.29175-1-patrick.bellasi@arm.com> <20181029183311.29175-3-patrick.bellasi@arm.com> <20181107121126.GN9781@hirez.programming.kicks-ass.net> <20181107135039.GD14309@e110439-lin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181107135039.GD14309@e110439-lin> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 07, 2018 at 01:50:39PM +0000, Patrick Bellasi wrote: > On 07-Nov 13:11, Peter Zijlstra wrote: > > On Mon, Oct 29, 2018 at 06:32:56PM +0000, Patrick Bellasi wrote: > > > > > @@ -50,11 +52,13 @@ > > > #define SCHED_FLAG_RESET_ON_FORK 0x01 > > > #define SCHED_FLAG_RECLAIM 0x02 > > > #define SCHED_FLAG_DL_OVERRUN 0x04 > > > -#define SCHED_FLAG_UTIL_CLAMP 0x08 > > > +#define SCHED_FLAG_TUNE_POLICY 0x08 > > > +#define SCHED_FLAG_UTIL_CLAMP 0x10 > > > > That seems to suggest you want to do this patch first, but you didn't.. > > I've kept it here just to better highlight this change, suggested by > Juri, since we was not entirely sure you are fine with it... > > If you think it's ok adding a SCHED_FLAG_TUNE_POLICY behavior to the > sched_setattr syscall, I can certainly squash into the previous patch, > which gives more context on why we need it. I'm fine with the idea I think. It's the details I worry about. Which fields in particular are not updated with this. Are flags? Also, I'm not too keen on the name; since it explicitly does not modify the policy and its related parameters, so TUNE_POLICY is actively wrong. But the thing that confused me most is how fiddled the numbers to fit this before UTIL_CLAMP. > Since we are at that, are we supposed to document some{where,how} > these API changes ? I'm pretty sure there's a manpage somewhere... SCHED_SETATTR(2) seems to exist on my machine. So that wants updates.