mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: eric miao <eric.y.miao@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Jack Ren <jack.ren@marvell.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Dmitry Adamushko <dmitry.adamushko@gmail.com>
Subject: Re: [PATCH] sched: do not stop ticks when cpu is not idle
Date: Sat, 19 Jul 2008 00:27:54 +0200	[thread overview]
Message-ID: <20080718222754.GE31073@elte.hu> (raw)
In-Reply-To: <1216379283.28405.19.camel@twins>


* Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:

> On Fri, 2008-07-18 at 12:54 +0200, Ingo Molnar wrote:
> > * Ingo Molnar <mingo@elte.hu> wrote:
> > 
> > > --- a/kernel/sched.c
> > > +++ b/kernel/sched.c
> > > @@ -4446,7 +4446,8 @@ need_resched_nonpreemptible:
> > >  		rq->nr_switches++;
> > >  		rq->curr = next;
> > >  		++*switch_count;
> > > -
> > > +		if (rq->curr != rq->idle)
> > > +			tick_nohz_restart_sched_tick();
> > >  		context_switch(rq, prev, next); /* unlocks the rq */
> > 
> > hm, one problem i can see is lock dependencies. This code is executed 
> > with the rq lock while tick_nohz_restart_sched_tick() takes hr locks => 
> > not good. So i havent applied this just yet - this needs to be solved 
> > differently.
> 
> Actually, that should work these days...
> 
> Also, I assume Eric actually tested this with lockdep enabled (right, 
> Eric?) and that'll shout - or rather, lockup hard in this case - if 
> you got it wrong.

nope:

[    0.188011] =================================
[    0.188011] [ INFO: inconsistent lock state ]
[    0.188011] 2.6.26-tip-03835-g9d964b9-dirty #20198
[    0.188011] ---------------------------------
[    0.188011] inconsistent {in-hardirq-W} -> {hardirq-on-W} usage.
[    0.188011] swapper/0 [HC0[0]:SC0[0]:HE1:SE1] takes:
[    0.188011]  (&rq->rq_lock_key){+...}, at: [<ffffffff816a4b35>] schedule+0x191/0x900
[    0.188011] {in-hardirq-W} state was registered at:
[    0.188011]   [<ffffffffffffffff>] 0xffffffffffffffff

	Ingo

  reply	other threads:[~2008-07-18 22:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-18  6:41 eric miao
2008-07-18 10:24 ` Ingo Molnar
2008-07-18 10:54   ` Ingo Molnar
2008-07-18 11:08     ` Peter Zijlstra
2008-07-18 22:27       ` Ingo Molnar [this message]
2008-07-18 13:52   ` Thomas Gleixner
2008-07-18 14:38     ` eric miao
2008-07-18 15:27       ` Thomas Gleixner
2008-07-18 16:29         ` Heiko Carstens
2008-07-19  7:32           ` Thomas Gleixner
2008-07-21  7:34         ` Jack Ren
2008-07-21 19:13         ` Philippe Troin
2008-07-21 20:25           ` Thomas Gleixner
2008-07-21 20:53             ` Philippe Troin
2008-07-18 11:21 ` Dmitry Adamushko

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=20080718222754.GE31073@elte.hu \
    --to=mingo@elte.hu \
    --cc=a.p.zijlstra@chello.nl \
    --cc=dmitry.adamushko@gmail.com \
    --cc=eric.y.miao@gmail.com \
    --cc=jack.ren@marvell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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

Powered by JetHome