lkml.org 
[lkml]   [2013]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/7] sched, preempt: Fixup missed PREEMPT_NEED_RESCHED folding
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();
> }


\
 
 \ /
  Last update: 2013-11-21 09:41    [W:0.282 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site