mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Sasha Levin <sasha.levin@oracle.com>
Cc: Ingo Molnar <mingo@elte.hu>, Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Dave Jones <davej@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: sched: BUG in load_balance
Date: Mon, 18 Feb 2013 21:34:06 -0500	[thread overview]
Message-ID: <1361241246.23152.183.camel@gandalf.local.home> (raw)
In-Reply-To: <5122E12E.6000109@oracle.com>

On Mon, 2013-02-18 at 21:19 -0500, Sasha Levin wrote:

> > Only compiled tested:
> > 
> > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> > index 0fcdbff..a31174c 100644
> > --- a/kernel/sched/fair.c
> > +++ b/kernel/sched/fair.c
> > @@ -5222,9 +5222,9 @@ void idle_balance(int this_cpu, struct rq *this_rq)
> >  	update_rq_runnable_avg(this_rq, 1);
> >  
> >  	/*
> > -	 * Drop the rq->lock, but keep preempt disabled.
> > +	 * Drop the rq->lock, but keep softirqs disabled.
> >  	 */
> > -	preempt_disable();
> > +	local_bh_disable();
> >  	raw_spin_unlock_irq(&this_rq->lock);
> >  
> >  	update_blocked_averages(this_cpu);
> > @@ -5253,7 +5253,7 @@ void idle_balance(int this_cpu, struct rq *this_rq)
> >  	rcu_read_unlock();
> >  
> >  	raw_spin_lock_irq(&this_rq->lock);
> > -	preempt_enable();
> > +	local_bh_enable();
> 
> I have to admit, I'm slightly confused with the patch: there's a raw_spin_lock_irq()
> followed by local_bh_enable(). afaik it's illegal to call local_bh_enable() with
> interrupts disabled.
> 

Bah, you're right. I was trying to enable interrupts without enabling
softirqs, but if an interrupt happens here and raises a softirq, it will
miss being executed by the local_bh_enabled().

We can keep the preempt disable and only disable local_bh, around the
idle_balance(). But still, I'm getting uncomfortable with these patches,
they may need more work, and Peter's not too happy with them either.

Ingo,

Can you revert this and the previous patch, and I'll work with Peter to
get something that we can agree on, where we can hopefully remove the
idle hooks from the scheduler.

Thanks,

-- Steve


-- Steve




      reply	other threads:[~2013-02-19  2:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-19  0:55 Sasha Levin
2013-02-19  1:26 ` Steven Rostedt
2013-02-19  2:19   ` Sasha Levin
2013-02-19  2:34     ` Steven Rostedt [this message]

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=1361241246.23152.183.camel@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=davej@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=sasha.levin@oracle.com \
    /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

all inboxes | Powered by JetHome®