Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1235369

Re: [RFC][PATCH 07/11] sched: Stop setting PREEMPT_ACTIVE

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [RFC][PATCH 07/11] sched: Stop setting PREEMPT_ACTIVE
Date 2015-09-29 18:40 +0200
Message-ID <qe66C-3vi-5@gated-at.bofh.it> (permalink)
References <qdZHQ-2IS-3@gated-at.bofh.it> <qdZHQ-2IS-9@gated-at.bofh.it> <qe5ke-2lV-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Sep 29, 2015 at 11:41:02AM -0400, Steven Rostedt wrote:
> 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.

There was a comment stating this was important, and its a notrace
annotated function :-)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[RFC][PATCH 07/11] sched: Stop setting PREEMPT_ACTIVE Peter Zijlstra <peterz@infradead.org> - 2015-09-29 11:50 +0200
  Re: [RFC][PATCH 07/11] sched: Stop setting PREEMPT_ACTIVE Thomas Gleixner <tglx@linutronix.de> - 2015-09-29 15:20 +0200
  Re: [RFC][PATCH 07/11] sched: Stop setting PREEMPT_ACTIVE Steven Rostedt <rostedt@goodmis.org> - 2015-09-29 17:50 +0200
    Re: [RFC][PATCH 07/11] sched: Stop setting PREEMPT_ACTIVE Peter Zijlstra <peterz@infradead.org> - 2015-09-29 18:40 +0200

csiph-web