From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752950AbYKROcg (ORCPT ); Tue, 18 Nov 2008 09:32:36 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751234AbYKROc2 (ORCPT ); Tue, 18 Nov 2008 09:32:28 -0500 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.123]:37117 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751127AbYKROc1 (ORCPT ); Tue, 18 Nov 2008 09:32:27 -0500 Date: Tue, 18 Nov 2008 09:32:26 -0500 (EST) From: Steven Rostedt X-X-Sender: rostedt@gandalf.stny.rr.com To: Ingo Molnar cc: Heiko Carstens , linux-kernel@vger.kernel.org, Martin Schwidefsky Subject: Re: ftrace: preemptoff selftest not working In-Reply-To: <20081118135221.GE31146@elte.hu> Message-ID: References: <20081118125359.GA4417@osiris.boeblingen.de.ibm.com> <20081118135221.GE31146@elte.hu> User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 18 Nov 2008, Ingo Molnar wrote: > > * Steven Rostedt wrote: > > > > Hence the trace buffer will be empty. The patch below makes the > > > selftests working for me, since then they run in preemptible > > > context. But it is ugly and I'm not proposing it for upstream ;) > > > > > > Just wanted to make you aware that there is a bug. > > > > Yep, this might be a better answer than what I put into linux-tip > > (and my git repo). > > > > See: > > > > ftrace: force pass of preemptoff selftest > > > > The cause of the bug was the conversion of the BKL back to a > > spinlock, and making it non preempt. The initcall code is called > > with the BKL applied which now means it can not preempt. This breaks > > the preempt tracer selftest. > > > > My solution was to just force a pass if this is detected. Perhaps > > moving the test might be better. > > it would be better to just drop the BKL in that selftest. (or in all > selftests - an elevated preempt count will skew a number of things) I have no problem with that, but does the BKL play any role for being held? I have no idea why it is taken in boot up, so I'm hestiant to touch it. -- Steve