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

2020-10-15 Thread Dietmar Eggemann
On 14/10/2020 17:00, Yun Hsiang wrote: > On Tue, Oct 13, 2020 at 10:25:48PM +0200, Dietmar Eggemann wrote: >> Hi Yun, >> >> On 12/10/2020 18:31, Yun Hsiang wrote: [...] > The tg uclamp value may also change. If top-app's cpu.uclamp.min change > to 50 (~500), then task A's effective uclamp min val

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

2020-10-15 Thread Dietmar Eggemann
On 14/10/2020 16:50, Patrick Bellasi wrote: > > On Tue, Oct 13, 2020 at 22:25:48 +0200, Dietmar Eggemann > wrote... [...] >> On 12/10/2020 18:31, Yun Hsiang wrote: [...] > Not sure what's the specific use-case Yun is after, but I have at least > one in my mind. > > Let say a task does not n

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

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 SCHED_FLAG_UTIL_CLAMP_RESET flag to

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

2020-10-14 Thread Patrick Bellasi
On Tue, Oct 13, 2020 at 22:25:48 +0200, Dietmar Eggemann wrote... Hi Dietmar, > 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 SCHED_FLAG_UTIL_CLAMP_

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

2020-10-13 Thread Dietmar Eggemann
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 SCHED_FLAG_UTIL_CLAMP_RESET flag to allow the user to reset uclamp via > sched_setattr syscall. before we decide o

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

2020-10-13 Thread Patrick Bellasi
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 >> > attr, you just execute that loop in __setscheduler_uclamp() + reset >> > uc_se->user_defined. >>

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

2020-10-13 Thread Qais Yousef
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 > > attr, you just execute that loop in __setscheduler_uclamp() + reset > > uc_se->user_defined. > > > > It should be invalid to pass the SCHED_FLAG_UTIL_CLAMP_RESET with > > S

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

2020-10-13 Thread Patrick Bellasi
On Tue, Oct 13, 2020 at 12:29:51 +0200, Qais Yousef wrote... > On 10/13/20 10:21, Patrick Bellasi wrote: >> [...] >> > +#define SCHED_FLAG_UTIL_CLAMP_RESET (SCHED_FLAG_UTIL_CLAMP_RESET_MIN | \ >> > + SCHED_FLAG_UTIL_CLAMP_RESET_MAX) >> > + >> > #define SCHE

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

2020-10-13 Thread Qais Yousef
On 10/13/20 10:21, Patrick Bellasi wrote: > > Hi Yun, > thanks for sharing this new implementation. > > On Mon, Oct 12, 2020 at 18:31:40 +0200, 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 re

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

2020-10-13 Thread Patrick Bellasi
Hi Yun, thanks for sharing this new implementation. On Mon, Oct 12, 2020 at 18:31:40 +0200, 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

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