Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5924175imm; Mon, 23 Jul 2018 08:20:15 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdapOrxvrI6ESQzNvM7fdeXkSDMM/08cn1u7T1+UdDvttTTPhiZoUA2aIVb0uo6elv98OKZ X-Received: by 2002:a63:3f05:: with SMTP id m5-v6mr12542006pga.51.1532359215426; Mon, 23 Jul 2018 08:20:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532359215; cv=none; d=google.com; s=arc-20160816; b=pfJQTM6Xf4XC/vLxDyE265Y2YUx+MOoJ8ey2cnUFeiYARAbM7VNzOk/S5yEjZJjm4T +1bR73/QPjvB1BygFwiUyY72UPGV2NOWhZB0H47UZvdwE1QckJ+hXqKBBzmR3jekWgyx 9lYxW2rVt1ozUR5rECao61wXaxWQWvnYYxVAdcZxs1Hm8oNOhaB5iXw3WTa/DRWj/Bgf EIIlbeQu6nTC8irWmftU4UW5D+n2BWyP10rCl6yXr47lgm3rZCymAc93nH2FZ/Xq3T3O KcGQ1u0VkvQf3oq9wWF/htBHHoznx0v4f0T/oq6WFhG7dpbpjsIGAgioTFF6LD9wBBbg fvFA== 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=eumV+P5xqIB2VzsL33rCyafZtjEtgEkdsYhnyraGekA=; b=YThpk7ABbSJVkn4GbJloKdsSnCOeh6Hund46iaDnndLMHcfbzZHtAnyLUg/nh0riW0 ptseW2Tauy8OreYZgo+orgyWhEQnMLRkW0jEXOj9C9RSs+UVQLpbJBHowXBhROs4MohL OsBbgD9/skoC4zeJZUcjyx+aeCymhn//fPCK8Agu4cwA1KpoEznGGBvTkXYxq2+2ELkk ybfcRrLckNTgEfVuFymOaM3zWc9jgHQN5RXFoVLX2kd2qArMp84rDtaCpkm8oY2tlXD9 a98TH0H+Dye0Rg+k78YnQrWL1JZMGmLStrB3kWSvMd1Mfere51/DkgT3O8J2/AK5L5eb cxvQ== 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 s6-v6si5375527plr.33.2018.07.23.08.20.00; Mon, 23 Jul 2018 08:20:15 -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 S2388632AbeGWQTM (ORCPT + 99 others); Mon, 23 Jul 2018 12:19:12 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:35586 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388115AbeGWQTL (ORCPT ); Mon, 23 Jul 2018 12:19:11 -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 7A21D18A; Mon, 23 Jul 2018 08:17:29 -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 CFF763F237; Mon, 23 Jul 2018 08:17:26 -0700 (PDT) Date: Mon, 23 Jul 2018 16:17:24 +0100 From: Patrick Bellasi To: Suren Baghdasaryan 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 , Juri Lelli , Todd Kjos , Joel Fernandes , Steve Muckle Subject: Re: [PATCH v2 08/12] sched/core: uclamp: extend cpu's cgroup controller Message-ID: <20180723151724.GE2683@e110439-lin> References: <20180716082906.6061-1-patrick.bellasi@arm.com> <20180716082906.6061-9-patrick.bellasi@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 20-Jul 19:37, Suren Baghdasaryan wrote: > On Mon, Jul 16, 2018 at 1:29 AM, Patrick Bellasi > wrote: [...] > > +#ifdef CONFIG_UCLAMP_TASK_GROUP > > +static int cpu_util_min_write_u64(struct cgroup_subsys_state *css, > > + struct cftype *cftype, u64 min_value) > > +{ > > + struct task_group *tg; > > + int ret = -EINVAL; > > + > > + if (min_value > SCHED_CAPACITY_SCALE) > > + return -ERANGE; > > + > > + mutex_lock(&uclamp_mutex); > > + rcu_read_lock(); > > + > > + tg = css_tg(css); > > + if (tg->uclamp[UCLAMP_MIN].value == min_value) { > > + ret = 0; > > + goto out; > > + } > > + if (tg->uclamp[UCLAMP_MAX].value < min_value) > > + goto out; > > + > > + tg->uclamp[UCLAMP_MIN].value = min_value; > + ret = 0; > > Are these assignments missing or am I missing something? Same for > cpu_util_max_write_u64(). They are introduced in the following patch, to keep this one focus just on CGroups integration. I'm also returning -EINVAL at this stage since, with just this patch in, we are not really providing any good service to user-space, i.e. it's like clamp groups not being available... Maybe I can call this out better in the change log ;) > > +out: > > + rcu_read_unlock(); > > + mutex_unlock(&uclamp_mutex); > > + > > + return ret; > > +} [...] -- #include Patrick Bellasi