Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756996AbZCQMfZ (ORCPT ); Tue, 17 Mar 2009 08:35:25 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753685AbZCQMfK (ORCPT ); Tue, 17 Mar 2009 08:35:10 -0400 Received: from mx2.mail.elte.hu ([157.181.151.9]:54564 "EHLO mx2.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750963AbZCQMfI (ORCPT ); Tue, 17 Mar 2009 08:35:08 -0400 Date: Tue, 17 Mar 2009 13:34:42 +0100 From: Ingo Molnar To: "Metzger, Markus T" Cc: "linux-kernel@vger.kernel.org" , "tglx@linutronix.de" , "hpa@zytor.com" , "markus.t.metzger@gmail.com" , "roland@redhat.com" , "eranian@googlemail.com" , "oleg@redhat.com" , "Villacis, Juan" , "ak@linux.jf.intel.com" Subject: Re: [patch 1/5] x86, bts: detect size of DS fields Message-ID: <20090317123442.GB22759@elte.hu> References: <20090313104218.A30096@sedona.ch.intel.com> <20090313110357.GC31094@elte.hu> <928CFBE8E7CB0040959E56B4EA41A77E4A663C47@irsmsx504.ger.corp.intel.com> <20090317105558.GK6477@elte.hu> <928CFBE8E7CB0040959E56B4EA41A77E4A664285@irsmsx504.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <928CFBE8E7CB0040959E56B4EA41A77E4A664285@irsmsx504.ger.corp.intel.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-ELTE-VirusStatus: clean X-ELTE-SpamScore: -1.5 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-1.5 required=5.9 tests=BAYES_00 autolearn=no SpamAssassin version=3.2.3 -1.5 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1607 Lines: 51 * Metzger, Markus T wrote: > >-----Original Message----- > >From: Ingo Molnar [mailto:mingo@elte.hu] > >Sent: Tuesday, March 17, 2009 11:56 AM > >To: Metzger, Markus T > > > >the bigger problem is the runtime failure (boot warning) that i > >reported. Hence i cannot apply any new patches yet until that is > >resolved. > > I found your email at lkml.org. (i sent it to your intel.com address - perhaps it got dropped there somehow?) > I think I found the problem: > ds_request_bts() needs to allocate a small amount of memory. > It uses GFP_KERNEL. > > Hw-branch-tracer essentially does on_each_cpu(ds_request_bts()). > > Since ds_request_bts() is meant to be called on the cpu that > should be traced, it should use GFP_ATOMIC to allow calls from > smp_call_function() and friends. > > Would that be acceptable? That's not really a good solution - GFP_ATOMIC is not a reliable form of allocation. the other callsites are buggy too: smp_call_function_single(cpu, bts_trace_start_cpu, NULL, 1); done under the bts_tracer_lock in addition to an atomic IPI context. for_each_online_cpu() done under the mutex would be better i guess, plus you can allocate any memory before you do the SMP cross-call, and pass it to the IPI handler via the data parameter. (NULL in the sequence above) Ingo -- 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/