Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1590158 > unrolled thread

Re: [PATCH] sched/rt: Document why has_pushable_tasks() isn't called with a runqueue lock

Started byPeter Zijlstra <peterz@infradead.org>
First post2017-03-01 11:00 +0100
Last post2017-03-02 21:50 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] sched/rt: Document why has_pushable_tasks() isn't called  with a runqueue lock Peter Zijlstra <peterz@infradead.org> - 2017-03-01 11:00 +0100
    Re: [PATCH] sched/rt: Document why has_pushable_tasks() isn't  called with a runqueue lock Steven Rostedt <rostedt@goodmis.org> - 2017-03-02 21:50 +0100

#1590158 — Re: [PATCH] sched/rt: Document why has_pushable_tasks() isn't called with a runqueue lock

FromPeter Zijlstra <peterz@infradead.org>
Date2017-03-01 11:00 +0100
SubjectRe: [PATCH] sched/rt: Document why has_pushable_tasks() isn't called with a runqueue lock
Message-ID<tg9d9-1fv-37@gated-at.bofh.it>
On Tue, Feb 28, 2017 at 04:48:56PM -0500, Steven Rostedt wrote:

> +	/*
> +	 * Normally, has_pushable_tasks() would be performed within the
> +	 * runqueue lock being held. But if it was not set when entering

"not set" what? I'm having trouble parsing this.

> +	 * this hard interrupt handler function, then to have it set would
> +	 * require a wake up. A wake up of an RT task will either cause a
> +	 * schedule if the woken task is higher priority than the running
> +	 * task, or it would try to do a push from the CPU doing the wake
> +	 * up. Grabbing the runqueue lock in such a case would more likely
> +	 * just cause unnecessary contention.
> +	 */
>  	if (has_pushable_tasks(rq)) {
>  		raw_spin_lock(&rq->lock);
>  		push_rt_task(rq);

[toc] | [next] | [standalone]


#1591456 — Re: [PATCH] sched/rt: Document why has_pushable_tasks() isn't called with a runqueue lock

FromSteven Rostedt <rostedt@goodmis.org>
Date2017-03-02 21:50 +0100
SubjectRe: [PATCH] sched/rt: Document why has_pushable_tasks() isn't called with a runqueue lock
Message-ID<tgFPH-7zy-3@gated-at.bofh.it>
In reply to#1590158
On Wed, 1 Mar 2017 09:37:01 +0100
Peter Zijlstra <peterz@infradead.org> wrote:

> On Tue, Feb 28, 2017 at 04:48:56PM -0500, Steven Rostedt wrote:
> 
> > +	/*
> > +	 * Normally, has_pushable_tasks() would be performed within the
> > +	 * runqueue lock being held. But if it was not set when entering  
> 
> "not set" what? I'm having trouble parsing this.

I always forgot that with documentation, pronouns should be avoided.

"But if has_pushable_tasks is false when entering"

> 
> > +	 * this hard interrupt handler function, then to have it set would

", then to have it set to true would"

> > +	 * require a wake up. A wake up of an RT task will either cause a
> > +	 * schedule if the woken task is higher priority than the running
> > +	 * task, or it would try to do a push from the CPU doing the wake
> > +	 * up. Grabbing the runqueue lock in such a case would more likely
> > +	 * just cause unnecessary contention.
> > +	 */
> >  	if (has_pushable_tasks(rq)) {
> >  		raw_spin_lock(&rq->lock);
> >  		push_rt_task(rq);  

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web