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

2020-10-29 Thread Qais Yousef
On 10/29/20 16:50, Dietmar Eggemann wrote: > On 29/10/2020 14:06, Qais Yousef wrote: > > On 10/29/20 21:02, Yun Hsiang wrote: > >> 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

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

2020-10-29 Thread Dietmar Eggemann
On 29/10/2020 14:06, Qais Yousef wrote: > On 10/29/20 21:02, Yun Hsiang wrote: >> 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: [...] #define SCHED_FLAG_UTIL_CLAMP (

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

2020-10-29 Thread Qais Yousef
On 10/29/20 21:02, Yun Hsiang wrote: > 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

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 method to reset. > > > > Add

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

2020-10-29 Thread Dietmar Eggemann
On 28/10/2020 19:41, Yun Hsiang wrote: > Hi Patrick, > > On Wed, Oct 28, 2020 at 11:11:07AM +0100, Patrick Bellasi wrote: [...] >> 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

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

2020-10-29 Thread Qais Yousef
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 method to reset. > > Add SCHED_FLAG_UTIL_CLAMP_RESET flag to allow the user to reset uclamp via > sched_setattr sy

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

2020-10-28 Thread Qais Yousef
On 10/28/20 19:03, Patrick Bellasi wrote: > > On Wed, Oct 28, 2020 at 12:39:43 +0100, Qais Yousef > wrote... > > > On 10/28/20 11:11, Patrick Bellasi wrote: > >> >> > >> >> /* > >> >> * RT by default have a 100% boost value that could be > >> >> modified > >>

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

2020-10-28 Thread Patrick Bellasi
Hi Dietmar, Yun, I hope I'm not too late before v4 posting ;) I think the overall approach is sound, I just added in a couple of cleanups and a possible fix (user_defined reset). Best, Patrick On Tue, Oct 27, 2020 at 16:58:13 +0100, Yun Hsiang wrote... > Hi Diet mar, > On Mon, Oct 26, 2020

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

2020-10-28 Thread Yun Hsiang
Hi Patrick, On Wed, Oct 28, 2020 at 11:11:07AM +0100, Patrick Bellasi wrote: > > Hi Dietmar, Yun, > I hope I'm not too late before v4 posting ;) > > I think the overall approach is sound, I just added in a couple of > cleanups and a possible fix (user_defined reset). > > Best, > Patrick > > >

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

2020-10-28 Thread Qais Yousef
On 10/28/20 11:11, Patrick Bellasi wrote: > >> > >>/* > >> * RT by default have a 100% boost value that could be modified > >> * at runtime. > >> */ > >>if (unlikely(rt_task(p) && clamp_id == UCLAMP_MIN)) > >> - __uclamp

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

2020-10-28 Thread Patrick Bellasi
On Wed, Oct 28, 2020 at 12:39:43 +0100, Qais Yousef wrote... > On 10/28/20 11:11, Patrick Bellasi wrote: >> >> >> >> /* >> >>* RT by default have a 100% boost value that could be modified >> >>* at runtime. >> >>*/ >> >> if (unlikely(rt

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: > >>> If the user wants to stop controlling

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

2020-10-26 Thread Dietmar Eggemann
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: >>> If the user wants to stop controlling uclamp and let the task inherit >>> the value from the group, we need a method to reset. >>

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

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

2020-10-26 Thread Dietmar Eggemann
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_FLAG_UTIL_CLAMP_RESET flag to allow the user to reset uclamp via > sched_setattr syscall. > > The policy is > _CLAMP_

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

2020-10-25 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