[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090317123442.GB22759@elte.hu>
Date: Tue, 17 Mar 2009 13:34:42 +0100
From: Ingo Molnar <mingo@...e.hu>
To: "Metzger, Markus T" <markus.t.metzger@...el.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"hpa@...or.com" <hpa@...or.com>,
"markus.t.metzger@...il.com" <markus.t.metzger@...il.com>,
"roland@...hat.com" <roland@...hat.com>,
"eranian@...glemail.com" <eranian@...glemail.com>,
"oleg@...hat.com" <oleg@...hat.com>,
"Villacis, Juan" <juan.villacis@...el.com>,
"ak@...ux.jf.intel.com" <ak@...ux.jf.intel.com>
Subject: Re: [patch 1/5] x86, bts: detect size of DS fields
* Metzger, Markus T <markus.t.metzger@...el.com> wrote:
> >-----Original Message-----
> >From: Ingo Molnar [mailto:mingo@...e.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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists