From: Peter Zijlstra <peterz@infradead.org>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org,
Tvrtko Ursulin <tvrtko.ursulin@intel.com>,
Ingo Molnar <mingo@redhat.com>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>
Subject: Re: [RFC 1/6] sched: Add nice value change notifier
Date: Mon, 4 Oct 2021 10:39:29 +0200 [thread overview]
Message-ID: <YVq9weHmEGOVsj/p@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <01a968c9-c427-f4c7-44d5-2f47f939f9eb@linux.intel.com>
On Mon, Oct 04, 2021 at 09:12:37AM +0100, Tvrtko Ursulin wrote:
> On 01/10/2021 16:48, Peter Zijlstra wrote:
> > Hmm? That's for normalize_rt_tasks() only, right? Just don't have it
> > call the notifier in that special case (that's a magic sysrq thing
> > anyway).
>
> You mean my talk about tasklist_lock? No, it is also on the syscall part I
> am interested in as well. Call chain looks like this:
Urgh, I alwys miss that because it lives outside of sched.. :/
> sys_setpriority()
> {
> ...
> rcu_read_lock();
> read_lock(&tasklist_lock);
> ...
> set_one_prio()
> set_user_nice()
> {
> ...
> task_rq_lock();
> -> my notifier from this RFC [1]
> task_rq_unlock();
> -> I can move the notifier here for _some_ improvement [2]
> }
> ...
> read_unlock(&tasklist_lock);
> rcu_read_unlock();
> }
>
> So this RFC had the notifier call chain at [1], which I understood was the
> thing you initially pointed was horrible, being under a scheduler lock.
>
> I can trivially move it to [2] but that still leaves it under the tasklist
> lock. I don't have a good feel how much better that would be. If not good
> enough then I will look for a smarter solution with less opportunity for
> global impact.
So task_list lock is pretty terrible and effectively unbound already
(just create more tasks etc..) so adding a notifier call there shouldn't
really make it much worse.
next prev parent reply other threads:[~2021-10-04 8:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-30 17:15 [RFC 0/6] CPU + GPU synchronised priority scheduling Tvrtko Ursulin
2021-09-30 17:15 ` [RFC 1/6] sched: Add nice value change notifier Tvrtko Ursulin
2021-09-30 18:33 ` Peter Zijlstra
2021-10-01 9:04 ` Tvrtko Ursulin
2021-10-01 10:32 ` Tvrtko Ursulin
2021-10-01 15:48 ` Peter Zijlstra
2021-10-04 8:12 ` Tvrtko Ursulin
2021-10-04 8:39 ` Peter Zijlstra [this message]
2021-09-30 17:15 ` [RFC 2/6] drm/i915: Explicitly track DRM clients Tvrtko Ursulin
2021-09-30 17:15 ` [RFC 3/6] drm/i915: Make GEM contexts " Tvrtko Ursulin
2021-09-30 17:15 ` [RFC 4/6] drm/i915: Track all user contexts per client Tvrtko Ursulin
2021-09-30 17:15 ` [RFC 5/6] drm/i915: Keep track of registered clients indexed by task struct Tvrtko Ursulin
2021-09-30 17:15 ` [RFC 6/6] drm/i915: Connect task and GPU scheduling priorities Tvrtko Ursulin
2021-09-30 18:34 ` [RFC 0/6] CPU + GPU synchronised priority scheduling Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YVq9weHmEGOVsj/p@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tvrtko.ursulin@intel.com \
--cc=tvrtko.ursulin@linux.intel.com \
--cc=vincent.guittot@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).