[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130911082530.GN31370@twins.programming.kicks-ass.net>
Date: Wed, 11 Sep 2013 10:25:30 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Andy Lutomirski <luto@...capital.net>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Ingo Molnar <mingo@...nel.org>,
Andi Kleen <ak@...ux.intel.com>, Peter Anvin <hpa@...or.com>,
Mike Galbraith <bitbucket@...ine.de>,
Thomas Gleixner <tglx@...utronix.de>,
Arjan van de Ven <arjan@...ux.intel.com>,
Frederic Weisbecker <fweisbec@...il.com>,
linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org
Subject: Re: [PATCH 2/7] sched: Add NEED_RESCHED to the preempt_count
On Tue, Sep 10, 2013 at 06:59:57PM -0700, Andy Lutomirski wrote:
> On 09/10/2013 06:08 AM, Peter Zijlstra wrote:
> > In order to combine the preemption and need_resched test we need to
> > fold the need_resched information into the preempt_count value.
> >
> > We keep the existing TIF_NEED_RESCHED infrastructure in place but at 3
> > sites test it and fold its value into preempt_count; namely:
> >
> > - resched_task() when setting TIF_NEED_RESCHED on the current task
> > - scheduler_ipi() when resched_task() sets TIF_NEED_RESCHED on a
> > remote task it follows it up with a reschedule IPI
> > and we can modify the cpu local preempt_count from
> > there.
> > - cpu_idle_loop() for when resched_task() found tsk_is_polling().
>
>
> It looks like the intel_idle code can get confused if TIF_NEED_RESCHED
> is set but the preempt resched bit is not -- the need_resched call
> between monitor and mwait won't notice TIF_NEED_RESCHED.
>
> Is this condition possible?
Ah indeed, I'll have to go find all idle loops out there it seems. Now
if only they were easy to spot :/
I was hoping the generic idle thing was good enough, apparently not
quite. Thanks for spotting that.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists