From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752358AbbGULHN (ORCPT ); Tue, 21 Jul 2015 07:07:13 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:33940 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752157AbbGULHK (ORCPT ); Tue, 21 Jul 2015 07:07:10 -0400 Date: Tue, 21 Jul 2015 13:07:00 +0200 From: Peter Zijlstra To: Sasha Levin Cc: linux-kernel@vger.kernel.org, mingo@kernel.org, fweisbec@gmail.com, tglx@linutronix.de, hpa@zytor.com, torvalds@linux-foundation.org, "Paul E. McKenney" Subject: Re: [tip:sched/core] sched/preempt: Optimize preemption operations on __schedule() callers Message-ID: <20150721110700.GN19282@twins.programming.kicks-ass.net> References: <1431441711-29753-5-git-send-email-fweisbec@gmail.com> <55AD72C3.4000300@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55AD72C3.4000300@oracle.com> 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 Mon, Jul 20, 2015 at 06:14:27PM -0400, Sasha Levin wrote: > On 05/19/2015 03:17 AM, tip-bot for Frederic Weisbecker wrote: > > Commit-ID: b30f0e3ffedfa52b1d67a302ae5860c49998e5e2 > > sched/preempt: Optimize preemption operations on __schedule() callers > > > I was seeing RCU stall warnings that appeared to have different backtrace > each time, but would reliably trigger when fuzzing and looked something like this: > [4394886.426627] preempt_schedule_irq (./arch/x86/include/asm/paravirt.h:807 kernel/sched/core.c:3218) The only 'obvious' difference there seems to be something like the below. Prior to the patch preempt_schedule_irq() used __preempt_count_{add,sub}() which are the !tracing versions. Does this make it go again? If not, can you provide a .config? --- include/linux/preempt.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/preempt.h b/include/linux/preempt.h index 84991f185173..235a9f2d76fe 100644 --- a/include/linux/preempt.h +++ b/include/linux/preempt.h @@ -139,14 +139,14 @@ extern void preempt_count_sub(int val); #define preempt_active_enter() \ do { \ - preempt_count_add(PREEMPT_ACTIVE + PREEMPT_DISABLE_OFFSET); \ + __preempt_count_add(PREEMPT_ACTIVE + PREEMPT_DISABLE_OFFSET); \ barrier(); \ } while (0) #define preempt_active_exit() \ do { \ barrier(); \ - preempt_count_sub(PREEMPT_ACTIVE + PREEMPT_DISABLE_OFFSET); \ + __preempt_count_sub(PREEMPT_ACTIVE + PREEMPT_DISABLE_OFFSET); \ } while (0) #ifdef CONFIG_PREEMPT_COUNT