Re: [PATCH v2] sched: Have do_idle() call __schedule() without enabling preemption
From: Peter Zijlstra
Date: Thu Apr 13 2017 - 04:45:08 EST
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().
And because that function is a no-op for the idle thread, the idle
thread can do without calling that and therefore avoid the preemption
window.
You also need a few words about fake idle threads, search play_idle()
callers.
You could also make schedule_idle() more robust by adding a WARN for the
blk_schedule_flush_plug() condition.
You Changelog is still entirely long and rambling but fails to mention
the fundamental important stuff :-(