[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGsJ_4w5Y4=v93YmTrXJ6hDgjKshxiAZ-ox-Nz_7uRwe4ECtdw@mail.gmail.com>
Date: Wed, 6 Oct 2021 20:58:15 +1300
From: Barry Song <21cnbao@...il.com>
To: "Wanghui (John)" <john.wanghui@...wei.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@...ux.intel.com>,
Intel-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
LKML <linux-kernel@...r.kernel.org>,
Tvrtko Ursulin <tvrtko.ursulin@...el.com>,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>
Subject: Re: [RFC 1/8] sched: Add nice value change notifier
On Wed, Oct 6, 2021 at 5:15 PM Wanghui (John) <john.wanghui@...wei.com> wrote:
>
> 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:
We already have an ionice for block io scheduler. hardly can this new io_nice
be generic to all I/O. it seems the patchset is trying to link
process' nice with
GPU's scheduler, to some extent, it makes more senses than having a
common ionice because we have a lot of IO devices in the systems, we don't
know which I/O the ionice of task_struct should be applied to.
Maybe we could have an ionice dedicated for GPU just like ionice for CFQ
of bio/request scheduler.
>
> 1. Decoupled with fair scheduelr. In our use case, high priority tasks often
> use rt scheduler.
Is it possible to tell GPU RT as we are telling them CFS nice?
> 2. The range of value don't need to be bound to -20~19 or 0~139
>
could build a mapping between the priorities of process and GPU. It seems
not a big deal.
Thanks
barry
Powered by blists - more mailing lists