Re: [PATCH v2 3/5] sched,idle: Clear polling before descheduling the idle thread

Peter Zijlstra
2014-06-04T17:36:58Z

On Wed, Jun 04, 2014 at 10:31:16AM -0700, Andy Lutomirski wrote:
> @@ -218,6 +234,15 @@ static void cpu_idle_loop(void)
> */
> preempt_set_need_resched();
> tick_nohz_idle_exit();
> + __current_clr_polling();
> +
> + /*
> + * We promise to reschedule if need_resched is set while
> + * polling is set. That means that clearing polling
> + * needs to be visible before rescheduling.
> + */
> + smp_mb__after_clear_bit();
> +
> schedule_preempt_disabled();
> }
> }

I recently renamed those barriers, its now called:

smp_mb__after_atomic();

It'll still compile with the old names, and even work, but you'll get
__deprecated warns and horrid code generation.

I'll fix up when applying these patches, no need to resend.

Thanks!