Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4692783imm; Tue, 7 Aug 2018 05:57:55 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc8X6qg0GIp1SwUmRseiIRIJHBOor+6ILKSD5zQUFJEnTDAFR2dUptz58zcEIoPHnc6+cKu X-Received: by 2002:a63:e811:: with SMTP id s17-v6mr18167949pgh.176.1533646675533; Tue, 07 Aug 2018 05:57:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533646675; cv=none; d=google.com; s=arc-20160816; b=lMmzcx1G13y1haMfoDVmLUEsEGYVZrwKzJBWKs7Xzmd5u7+agyYVU0PhlM9ZStOy8O or08GPcVY43Bjg+EAJ5Ox4S0vCM3Jn/U+DbXvtJNAIGN5Ffmxcjpccc0bA/zNXrcOJI4 WGNsR2DPQtnJTLXGy/81obqNmq/5p7zP0ph70eu+GCJGRdW5RlwY3bUNoyg99vW9E8kK rd32CFoWWOHyUp7NB/0o3fqZENbFlDLcn9Y6HZD3lfHnlA0mpbtKAlB5vHugt0PuamPq 0YMM3gDha29O5g6LyhZOPXcenS5SDx9LTcArwv68R+uhpcp+2a0YqkYcej52cQnrTfNu Stzg== 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=bw3qLRMbKJ6HZRAJ9WL0GBg9v0Vg4HYIc5ZCbt6hI0U=; b=jteBpixHafwi1rTG4rB7I2PcxEXRsm48lhtIaMHEAeflBTY8VhGOW7Jm+cdsR6fefn ovA4CUiVZn868vOua1krN1XuwBqTbgJqMZ+V7NH5okwMixBFuD31qX+jogwQZquOcaq7 uHXM556wccVx2xWYDJ84QJXg1E4tz61XVv76N7TRsEzLYQWvrbVFo2v+Yj/gotoF8nkX 2c9gXkIA15j5XN4aFU8yg+fhGgXR1SRyHfBGBsp2sE63mx7CDhfz6WV1uNXsXFlj1+Z7 hD8+7xjzaOWMrfAZMlKq/E/1NfXOcuhjLi24lBxSXre6jrd/UD5QU0HR5lQhJKS6Jz7c feYQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d1-v6si1369836pfk.166.2018.08.07.05.57.40; Tue, 07 Aug 2018 05:57:55 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389192AbeHGOuD (ORCPT + 99 others); Tue, 7 Aug 2018 10:50:03 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:42637 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732703AbeHGOuD (ORCPT ); Tue, 7 Aug 2018 10:50:03 -0400 Received: by mail-wr1-f68.google.com with SMTP id e7-v6so15604911wrs.9 for ; Tue, 07 Aug 2018 05:35:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=bw3qLRMbKJ6HZRAJ9WL0GBg9v0Vg4HYIc5ZCbt6hI0U=; b=oZLtQMv6t4obgsASOPnxLkZmE9tMmAOI1h56FCtMG8msFAxrCii54MqSj0ZMzWs4Fp qkAAV/o1gg6HfzUczn6PYmufoFDkmoMigfesuEYE83LJe6GG4/5KV8zV1c3gODf4IJsW 7Rk0neZw1kuhHZP1lKapHhWA2hB19VSk7DuMWAOJM7j2yY4IOBj3MiAReoTJ2bCjbJf1 CGeV9pu/z+QxlaXrRSp4/wU7bcWM8v2pdDU2odmCvusOTj/X7u8MhSE0ZxeTo99BO5su e2LjbEedAAozdGwIVpBiLGvS6yp0123vLmyDxs8yj0NKEJpkRkXBNjQ9p9YWJ6rpsmrW HGzg== X-Gm-Message-State: AOUpUlFag4K1UfCi0+Xs8lVTJ9zgQZMyXqKQIhPkc4CPsir6CkXph3JC wHTxiXQPnpJuWNC5TfjShMCUhw== X-Received: by 2002:adf:eb4c:: with SMTP id u12-v6mr13215609wrn.174.1533645354613; Tue, 07 Aug 2018 05:35:54 -0700 (PDT) Received: from localhost.localdomain (p200300EF2BD31703FE367972448AED7A.dip0.t-ipconnect.de. [2003:ef:2bd3:1703:fe36:7972:448a:ed7a]) by smtp.gmail.com with ESMTPSA id b2-v6sm2001085wmh.3.2018.08.07.05.35.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Aug 2018 05:35:53 -0700 (PDT) Date: Tue, 7 Aug 2018 14:35:50 +0200 From: Juri Lelli To: Patrick Bellasi 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: <20180807123550.GA3062@localhost.localdomain> References: <20180806163946.28380-1-patrick.bellasi@arm.com> <20180806163946.28380-2-patrick.bellasi@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180806163946.28380-2-patrick.bellasi@arm.com> 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 06/08/18 17:39, Patrick Bellasi wrote: [...] > @@ -4218,6 +4245,13 @@ static int __sched_setscheduler(struct task_struct *p, > return retval; > } > > + /* Configure utilization clamps for the task */ > + if (attr->sched_flags & SCHED_FLAG_UTIL_CLAMP) { > + retval = __setscheduler_uclamp(p, attr); > + if (retval) > + return retval; > + } > + IIUC, this is available to root and non-root users. In the latter case, how do we cope with the fact that some user might occupy all the available clamping groups configured for the system? Best, - Juri