lkml.org 
[lkml]   [2021]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC 1/8] sched: Add nice value change notifier
From
Date
HI Tvrtko

On 2021/10/4 22:36, Tvrtko Ursulin wrote:
> void set_user_nice(struct task_struct *p, long nice)
> {
> bool queued, running;
> - int old_prio;
> + int old_prio, ret;
> struct rq_flags rf;
> struct rq *rq;
>
> @@ -6915,6 +6947,9 @@ void set_user_nice(struct task_struct *p, long nice)
>
> out_unlock:
> task_rq_unlock(rq, p, &rf);
> +
> + ret = atomic_notifier_call_chain(&user_nice_notifier_list, nice, p);
> + WARN_ON_ONCE(ret != NOTIFY_DONE);
> }
How about adding a new "io_nice" to task_struct,and move the call chain to
sched_setattr/getattr, there are two benefits:

1. Decoupled with fair scheduelr. In our use case, high priority tasks often
use rt scheduler.
2. The range of value don't need to be bound to -20~19 or 0~139




\
 
 \ /
  Last update: 2021-10-06 06:11    [W:0.660 / U:0.776 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site