lkml.org 
[lkml]   [2015]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 07/11] sched: Stop setting PREEMPT_ACTIVE
On Tue, 29 Sep 2015 11:28:32 +0200
Peter Zijlstra <peterz@infradead.org> wrote:

> Now that nothing tests for PREEMPT_ACTIVE anymore, stop setting it.
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>


> @@ -3243,13 +3243,7 @@ asmlinkage __visible void __sched notrac
> return;
>
> do {
> - /*
> - * Use raw __prempt_count() ops that don't call function.
> - * We can't call functions before disabling preemption which
> - * disarm preemption tracing recursions.
> - */
> - __preempt_count_add(PREEMPT_ACTIVE + PREEMPT_DISABLE_OFFSET);
> - barrier();
> + preempt_disable_notrace();
> /*
> * Needs preempt disabled in case user_exit() is traced
> * and the tracer calls preempt_enable_notrace() causing
> @@ -3259,8 +3253,7 @@ asmlinkage __visible void __sched notrac
> __schedule(true);
> exception_exit(prev_ctx);
>
> - barrier();
> - __preempt_count_sub(PREEMPT_ACTIVE + PREEMPT_DISABLE_OFFSET);
> + preempt_enable_no_resched_notrace();

Nice, you used the notrace variants for this function.

Reviewed-by: Steven Rostedt <rostedt@goodmis.org>

-- Steve

> } while (need_resched());
> }


\
 
 \ /
  Last update: 2015-09-29 18:01    [W:0.250 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site