Re: [PATCH v5 1/1] sched/uclamp: add SCHED_FLAG_UTIL_CLAMP_RESET flag to reset uclamp

2020-11-13 Thread Qais Yousef
On 11/13/20 12:45, Dietmar Eggemann wrote: > On 12/11/2020 17:01, Dietmar Eggemann wrote: > > On 12/11/2020 15:41, Qais Yousef wrote: > >> On 11/11/20 18:41, Dietmar Eggemann wrote: > >>> On 10/11/2020 13:21, Peter Zijlstra wrote: > On Tue, Nov 03, 2020 at 10:37:56AM +0800, Yun Hsiang wrote: >

Re: [PATCH v5 1/1] sched/uclamp: add SCHED_FLAG_UTIL_CLAMP_RESET flag to reset uclamp

2020-11-13 Thread Dietmar Eggemann
On 12/11/2020 17:01, Dietmar Eggemann wrote: > On 12/11/2020 15:41, Qais Yousef wrote: >> On 11/11/20 18:41, Dietmar Eggemann wrote: >>> On 10/11/2020 13:21, Peter Zijlstra wrote: On Tue, Nov 03, 2020 at 10:37:56AM +0800, Yun Hsiang wrote: [...] >> If you or Yun would still like to send the

Re: [PATCH v5 1/1] sched/uclamp: add SCHED_FLAG_UTIL_CLAMP_RESET flag to reset uclamp

2020-11-12 Thread Dietmar Eggemann
On 12/11/2020 15:41, Qais Yousef wrote: > On 11/11/20 18:41, Dietmar Eggemann wrote: >> On 10/11/2020 13:21, Peter Zijlstra wrote: >>> On Tue, Nov 03, 2020 at 10:37:56AM +0800, Yun Hsiang wrote: [...] > I assume we agree then that we don't want to explicitly document this quirky > feature and kee

Re: [PATCH v5 1/1] sched/uclamp: add SCHED_FLAG_UTIL_CLAMP_RESET flag to reset uclamp

2020-11-12 Thread Qais Yousef
On 11/11/20 18:41, Dietmar Eggemann wrote: > On 10/11/2020 13:21, Peter Zijlstra wrote: > > On Tue, Nov 03, 2020 at 10:37:56AM +0800, Yun Hsiang wrote: > >> If the user wants to stop controlling uclamp and let the task inherit > >> the value from the group, we need a method to reset. > >> > >> Add

Re: [PATCH v5 1/1] sched/uclamp: add SCHED_FLAG_UTIL_CLAMP_RESET flag to reset uclamp

2020-11-12 Thread Dietmar Eggemann
On 11/11/2020 19:04, Peter Zijlstra wrote: > On Wed, Nov 11, 2020 at 06:41:07PM +0100, Dietmar Eggemann wrote: >> diff --git a/include/uapi/linux/sched/types.h >> b/include/uapi/linux/sched/types.h >> index c852153ddb0d..b9165f17dddc 100644 >> --- a/include/uapi/linux/sched/types.h >> +++ b/includ

Re: [PATCH v5 1/1] sched/uclamp: add SCHED_FLAG_UTIL_CLAMP_RESET flag to reset uclamp

2020-11-11 Thread Yun Hsiang
On Wed, Nov 11, 2020 at 07:04:41PM +0100, Peter Zijlstra wrote: > On Wed, Nov 11, 2020 at 06:41:07PM +0100, Dietmar Eggemann wrote: > > diff --git a/include/uapi/linux/sched/types.h > > b/include/uapi/linux/sched/types.h > > index c852153ddb0d..b9165f17dddc 100644 > > --- a/include/uapi/linux/sche

Re: [PATCH v5 1/1] sched/uclamp: add SCHED_FLAG_UTIL_CLAMP_RESET flag to reset uclamp

2020-11-11 Thread Peter Zijlstra
On Wed, Nov 11, 2020 at 06:41:07PM +0100, Dietmar Eggemann wrote: > diff --git a/include/uapi/linux/sched/types.h > b/include/uapi/linux/sched/types.h > index c852153ddb0d..b9165f17dddc 100644 > --- a/include/uapi/linux/sched/types.h > +++ b/include/uapi/linux/sched/types.h > @@ -115,8 +115,8 @@ s

Re: [PATCH v5 1/1] sched/uclamp: add SCHED_FLAG_UTIL_CLAMP_RESET flag to reset uclamp

2020-11-11 Thread Dietmar Eggemann
On 10/11/2020 13:21, Peter Zijlstra wrote: > On Tue, Nov 03, 2020 at 10:37:56AM +0800, Yun Hsiang wrote: >> If the user wants to stop controlling uclamp and let the task inherit >> the value from the group, we need a method to reset. >> >> Add SCHED_FLAG_UTIL_CLAMP_RESET flag to allow the user to r

Re: [PATCH v5 1/1] sched/uclamp: add SCHED_FLAG_UTIL_CLAMP_RESET flag to reset uclamp

2020-11-10 Thread Peter Zijlstra
On Tue, Nov 03, 2020 at 10:37:56AM +0800, Yun Hsiang wrote: > If the user wants to stop controlling uclamp and let the task inherit > the value from the group, we need a method to reset. > > Add SCHED_FLAG_UTIL_CLAMP_RESET flag to allow the user to reset uclamp via > sched_setattr syscall. > > Th

Re: [PATCH v5 1/1] sched/uclamp: add SCHED_FLAG_UTIL_CLAMP_RESET flag to reset uclamp

2020-11-10 Thread Peter Zijlstra
On Fri, Nov 06, 2020 at 11:36:48AM +0100, Patrick Bellasi wrote: > > +static int uclamp_reset(enum uclamp_id clamp_id, unsigned long flags) > > +{ > > + /* No _UCLAMP_RESET flag set: do not reset */ > > + if (!(flags & SCHED_FLAG_UTIL_CLAMP_RESET)) > > + return false; > > + > > + /

Re: [PATCH v5 1/1] sched/uclamp: add SCHED_FLAG_UTIL_CLAMP_RESET flag to reset uclamp

2020-11-09 Thread Qais Yousef
On 11/08/20 03:15, Yun Hsiang wrote: > I think SCHED_FLAG_ALL is for internal kernel use. So I agree with not > exporting it to user. +1 for the #ifdef __kernel__ > > > + if (!(flags & SCHED_FLAG_UTIL_CLAMP_RESET)) > > > + return false; > > > + > > > + /* Only _UCLAMP_RESET flag set: rese

Re: [PATCH v5 1/1] sched/uclamp: add SCHED_FLAG_UTIL_CLAMP_RESET flag to reset uclamp

2020-11-07 Thread Yun Hsiang
Hi Patrick, On Fri, Nov 06, 2020 at 11:36:48AM +0100, Patrick Bellasi wrote: > > Hi Yun, > thanks for keep improving this. > > I'm replying here but still considering all other reviewers comments. > > Best, > Patrick > > On Tue, Nov 03, 2020 at 03:37:56 +0100, Yun Hsiang > wrote... > > > If

Re: [PATCH v5 1/1] sched/uclamp: add SCHED_FLAG_UTIL_CLAMP_RESET flag to reset uclamp

2020-11-07 Thread Yun Hsiang
On Wed, Nov 04, 2020 at 10:45:09AM +0100, Dietmar Eggemann wrote: > On 03/11/2020 14:48, Qais Yousef wrote: > > Oops, +Juri for real this time. > > > > On 11/03/20 13:46, Qais Yousef wrote: > >> Hi Yun > >> > >> +Juri (A question for you below) > >> > >> On 11/03/20 10:37, Yun Hsiang wrote: > > [

Re: [PATCH v5 1/1] sched/uclamp: add SCHED_FLAG_UTIL_CLAMP_RESET flag to reset uclamp

2020-11-06 Thread Patrick Bellasi
Hi Yun, thanks for keep improving this. I'm replying here but still considering all other reviewers comments. Best, Patrick On Tue, Nov 03, 2020 at 03:37:56 +0100, Yun Hsiang wrote... > If the user wants to stop controlling uclamp and let the task inherit > the value from the group, we need

Re: [PATCH v5 1/1] sched/uclamp: add SCHED_FLAG_UTIL_CLAMP_RESET flag to reset uclamp

2020-11-04 Thread Dietmar Eggemann
On 03/11/2020 14:48, Qais Yousef wrote: > Oops, +Juri for real this time. > > On 11/03/20 13:46, Qais Yousef wrote: >> Hi Yun >> >> +Juri (A question for you below) >> >> On 11/03/20 10:37, Yun Hsiang wrote: [...] >>> include/uapi/linux/sched.h | 7 +++-- >>> kernel/sched/core.c| 59 ++

Re: [PATCH v5 1/1] sched/uclamp: add SCHED_FLAG_UTIL_CLAMP_RESET flag to reset uclamp

2020-11-03 Thread Qais Yousef
Hi Yun +Juri (A question for you below) On 11/03/20 10:37, Yun Hsiang wrote: > If the user wants to stop controlling uclamp and let the task inherit > the value from the group, we need a method to reset. > > Add SCHED_FLAG_UTIL_CLAMP_RESET flag to allow the user to reset uclamp via > sched_setat

Re: [PATCH v5 1/1] sched/uclamp: add SCHED_FLAG_UTIL_CLAMP_RESET flag to reset uclamp

2020-11-03 Thread Qais Yousef
Oops, +Juri for real this time. On 11/03/20 13:46, Qais Yousef wrote: > Hi Yun > > +Juri (A question for you below) > > On 11/03/20 10:37, Yun Hsiang wrote: > > If the user wants to stop controlling uclamp and let the task inherit > > the value from the group, we need a method to reset. > > > >

[PATCH v5 1/1] sched/uclamp: add SCHED_FLAG_UTIL_CLAMP_RESET flag to reset uclamp

2020-11-02 Thread Yun Hsiang
If the user wants to stop controlling uclamp and let the task inherit the value from the group, we need a method to reset. Add SCHED_FLAG_UTIL_CLAMP_RESET flag to allow the user to reset uclamp via sched_setattr syscall. The policy is _CLAMP_RESET => reset both min and m