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

From: Peter Zijlstra
Date: Wed Jun 04 2014 - 13:37:04 EST


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!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/