Re: [PATCH 2/7] sched, preempt: Fixup missed PREEMPT_NEED_RESCHEDfolding
From: Peter Zijlstra
Date: Thu Nov 21 2013 - 03:25:39 EST
On Wed, Nov 20, 2013 at 05:04:52PM +0100, Peter Zijlstra wrote:
> --- a/kernel/cpu/idle.c
> +++ b/kernel/cpu/idle.c
> @@ -105,14 +105,14 @@ static void cpu_idle_loop(void)
> __current_set_polling();
> }
> arch_cpu_idle_exit();
> - /*
> - * We need to test and propagate the TIF_NEED_RESCHED
> - * bit here because we might not have send the
> - * reschedule IPI to idle tasks.
> - */
> - if (tif_need_resched())
> - set_preempt_need_resched();
> }
/*
* Ensure our read doesn't slip before the read that
* terminates the loop above; in that situation we might
* actually fail to observe the TIF_NEED_RESCHED we
* _know_ must be set here.
*/
smp_rmb(); /* pairs with resched_task() */
> +
> + /*
> + * We need to test and propagate the TIF_NEED_RESCHED bit here
> + * because we might not have send the reschedule IPI to idle
> + * tasks.
> + */
> + preempt_fold_need_resched();
> tick_nohz_idle_exit();
> schedule_preempt_disabled();
> }
--
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/