From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934815AbbI2QbO (ORCPT ); Tue, 29 Sep 2015 12:31:14 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:45832 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932194AbbI2QbB (ORCPT ); Tue, 29 Sep 2015 12:31:01 -0400 Date: Tue, 29 Sep 2015 18:25:04 +0200 From: Peter Zijlstra To: Steven Rostedt Cc: mingo@kernel.org, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, fweisbec@gmail.com, oleg@redhat.com, umgwanakikbuti@gmail.com, tglx@linutronix.de Subject: Re: [RFC][PATCH 07/11] sched: Stop setting PREEMPT_ACTIVE Message-ID: <20150929162504.GT3816@twins.programming.kicks-ass.net> References: <20150929092825.540553633@infradead.org> <20150929093520.316380243@infradead.org> <20150929114102.6c5f2402@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150929114102.6c5f2402@gandalf.local.home> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 29, 2015 at 11:41:02AM -0400, Steven Rostedt wrote: > On Tue, 29 Sep 2015 11:28:32 +0200 > Peter Zijlstra wrote: > > > Now that nothing tests for PREEMPT_ACTIVE anymore, stop setting it. > > > > Signed-off-by: Peter Zijlstra (Intel) > > > > @@ -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 :-)