Re: [PATCH v2] sched: Have do_idle() call __schedule() without enabling preemption

From: Steven Rostedt
Date: Thu Apr 13 2017 - 10:54:49 EST


On Thu, 13 Apr 2017 16:38:07 +0200
Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:

> On Thu, Apr 13, 2017 at 09:48:40AM -0400, Steven Rostedt wrote:
> > On Thu, 13 Apr 2017 10:44:53 +0200
> > Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> >
> > > On Wed, Apr 12, 2017 at 02:27:44PM -0400, Steven Rostedt wrote:
> > > > + * schedule_idle() is similar to schedule_preempt_disable() except
> > > > + * that it never enables preemption.
> > >
> > > That's not right. The primary distinction is that it doesn't call
> > > sched_submit_work().
> >
> > That has nothing to do with fixing synchronize_rcu_tasks(), which is
> > the entire point of my patch, thus it is *not* the primary distinction.
>
> It is. The only reason you _can_ avoid that preemption window is by not
> doing sched_submit_work().

We are talking apples and oranges here. It's a distinction of the
generic call to schedule_preempt_disable() and only one instance of the
callers can actually run that. But it is not the idle case, in which
case it is a nop. But we are now bike shedding the issue.

>
> The moment you need to call that, the preemption window comes back.

I'll update my change log and comment and repost.

Thanks,

-- Steve