From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [PATCH v8 06/16] sched/core: uclamp: Extend sched_setattr() to support utilization clamping Date: Wed, 8 May 2019 21:44:39 +0200 Message-ID: <20190508194439.GF32547@worktop.programming.kicks-ass.net> References: <20190402104153.25404-1-patrick.bellasi@arm.com> <20190402104153.25404-7-patrick.bellasi@arm.com> <20190507111347.4ivnjwbymsf7i3e6@e110439-lin> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20190507111347.4ivnjwbymsf7i3e6@e110439-lin> Sender: linux-kernel-owner@vger.kernel.org To: Patrick Bellasi Cc: Suren Baghdasaryan , LKML , linux-pm@vger.kernel.org, linux-api@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 List-Id: linux-api@vger.kernel.org On Tue, May 07, 2019 at 12:13:47PM +0100, Patrick Bellasi wrote: > On 17-Apr 15:26, Suren Baghdasaryan wrote: > > On Tue, Apr 2, 2019 at 3:42 AM Patrick Bellasi wrote: > > > @@ -1056,6 +1100,13 @@ static void __init init_uclamp(void) > > > #else /* CONFIG_UCLAMP_TASK */ > > > static inline void uclamp_rq_inc(struct rq *rq, struct task_struct *p) { } > > > static inline void uclamp_rq_dec(struct rq *rq, struct task_struct *p) { } > > > +static inline int uclamp_validate(struct task_struct *p, > > > + const struct sched_attr *attr) > > > +{ > > > + return -ENODEV; > > > > ENOSYS might be more appropriate? > > Yep, agree, thanks! No, -ENOSYS (see the comment) is special in that it indicates the whole system call is unavailable; that is most certainly not the case!