Re: [PATCH v2] sched/uclamp: Allow to reset a task uclamp constraint value

2020-11-14 Thread Yun Hsiang
nge' case. > The related condition 'if (uc_se->user_defined)' moved from > __setscheduler_uclamp() into uclamp_reset(). I think this is great, thanks! Reviewed-by: Yun Hsiang > > Signed-off-by: Dietmar Eggemann > --- > > v1 [1] -> v2: > > 1) Removed struct sche

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 > > ---

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:

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 belo

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

2020-11-02 Thread Yun Hsiang
min and max _CLAMP_RESET | _CLAMP_MIN => reset min value _CLAMP_RESET | _CLAMP_MAX => reset max value _CLAMP_RESET | _CLAMP_MIN | _CLAMP_MAX => reset both min and max Signed-off-by: Yun Hsiang Reported-by: kernel test robot --- include/uapi/linux/sched.h | 7 +

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

2020-11-01 Thread Yun Hsiang
min and max _CLAMP_RESET | _CLAMP_MIN => reset min value _CLAMP_RESET | _CLAMP_MAX => reset max value _CLAMP_RESET | _CLAMP_MIN | _CLAMP_MAX => reset both min and max Signed-off-by: Yun Hsiang --- include/uapi/linux/sched.h | 7 +++-- kernel/sched/core.c

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

2020-10-29 Thread Yun Hsiang
Hi Qais, On Thu, Oct 29, 2020 at 11:08:18AM +, Qais Yousef wrote: > Hi Yun > > Sorry for chipping in late. > > On 10/25/20 15:36, Yun Hsiang wrote: > > If the user wants to stop controlling uclamp and let the task inherit > > the value from the group, we need a me

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

2020-10-28 Thread Yun Hsiang
t; > Best, > Patrick > > > On Tue, Oct 27, 2020 at 16:58:13 +0100, Yun Hsiang > wrote... > > > Hi Diet mar, > > On Mon, Oct 26, 2020 at 08:00:48PM +0100, Dietmar Eggemann wrote: > >> On 26/10/2020 16:45, Yun Hsiang wrote: > > [...] > > &g

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

2020-10-27 Thread Yun Hsiang
Hi Dietmar, On Mon, Oct 26, 2020 at 08:00:48PM +0100, Dietmar Eggemann wrote: > On 26/10/2020 16:45, Yun Hsiang wrote: > > Hi Dietmar, > > > > On Mon, Oct 26, 2020 at 10:47:11AM +0100, Dietmar Eggemann wrote: > >> On 25/10/2020 08:36, Yun Hsiang wrote: > >>

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

2020-10-26 Thread Yun Hsiang
Hi Dietmar, On Mon, Oct 26, 2020 at 10:47:11AM +0100, Dietmar Eggemann wrote: > On 25/10/2020 08:36, 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

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

2020-10-25 Thread Yun Hsiang
min and max _CLAMP_RESET | _CLAMP_MIN => reset min value _CLAMP_RESET | _CLAMP_MAX => reset max value _CLAMP_RESET | _CLAMP_MIN | _CLAMP_MAX => reset both min and max Signed-off-by: Yun Hsiang --- include/uapi/linux/sched.h | 7 +-- kernel/sched/core.c

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

2020-10-14 Thread Yun Hsiang
On Tue, Oct 13, 2020 at 06:52:03PM +0200, Patrick Bellasi wrote: Hi Patrick, > > On Tue, Oct 13, 2020 at 15:32:46 +0200, Qais Yousef > wrote... > > > On 10/13/20 13:46, Patrick Bellasi wrote: > >> > So IMO you just need a single SCHED_FLAG_UTIL_CLAMP_RESET that if set in > >> > the > >> >

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

2020-10-14 Thread Yun Hsiang
On Tue, Oct 13, 2020 at 10:25:48PM +0200, Dietmar Eggemann wrote: > Hi Yun, > > On 12/10/2020 18:31, 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

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

2020-10-12 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. Signed-off-by: Yun Hsiang --- include/uapi/linux/sched.h | 9

Re: [PATCH 1/1] sched/uclamp: release per-task uclamp control if user set to default value

2020-10-07 Thread Yun Hsiang
On Mon, Oct 05, 2020 at 06:15:00PM +0100, Qais Yousef wrote: > On 10/05/20 18:58, Patrick Bellasi wrote: > > [...] > > > >> it can not go back to the initial state to let the module(group) control. > > > > > > In case A changes its values e.g. from 3a to 3b it will go back to be > > > controlled

Re: [PATCH 1/1] sched/uclamp: release per-task uclamp control if user set to default value

2020-10-01 Thread Yun Hsiang
On Wed, Sep 30, 2020 at 03:12:51PM +0200, Dietmar Eggemann wrote: Hi Dietmar, > Hi Yun, > > On 28/09/2020 10:26, Yun Hsiang wrote: > > If the user wants to release the util clamp and let cgroup to control it, > > we need a method to reset. > > > > S

[PATCH 1/1] sched/uclamp: release per-task uclamp control if user set to default value

2020-09-28 Thread Yun Hsiang
If the user wants to release the util clamp and let cgroup to control it, we need a method to reset. So if the user set the task uclamp to the default value (0 for UCLAMP_MIN and 1024 for UCLAMP_MAX), reset the user_defined flag to release control. Signed-off-by: Yun Hsiang --- kernel/sched