mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: "Metzger, Markus T" <markus.t.metzger@intel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"markus.t.metzger@gmail.com" <markus.t.metzger@gmail.com>,
	"roland@redhat.com" <roland@redhat.com>,
	"eranian@googlemail.com" <eranian@googlemail.com>,
	"oleg@redhat.com" <oleg@redhat.com>,
	"Villacis, Juan" <juan.villacis@intel.com>,
	"ak@linux.jf.intel.com" <ak@linux.jf.intel.com>
Subject: Re: [patch 1/5] x86, bts: detect size of DS fields
Date: Tue, 17 Mar 2009 13:34:42 +0100	[thread overview]
Message-ID: <20090317123442.GB22759@elte.hu> (raw)
In-Reply-To: <928CFBE8E7CB0040959E56B4EA41A77E4A664285@irsmsx504.ger.corp.intel.com>


* Metzger, Markus T <markus.t.metzger@intel.com> 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

  reply	other threads:[~2009-03-17 12:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-13  9:42 Markus Metzger
2009-03-13 11:00 ` [tip:tracing/hw-branch-tracing] " Markus Metzger
2009-04-11  6:15   ` Jaswinder Singh Rajput
2009-03-13 11:01 ` [tip:tracing/hw-branch-tracing] x86, bts: cleanups Ingo Molnar
2009-03-13 11:03 ` [patch 1/5] x86, bts: detect size of DS fields Ingo Molnar
2009-03-13 11:09   ` Ingo Molnar
2009-03-16 14:34   ` Metzger, Markus T
2009-03-17 10:55     ` Ingo Molnar
2009-03-17 12:26       ` Metzger, Markus T
2009-03-17 12:34         ` Ingo Molnar [this message]
2009-03-17 12:57           ` Metzger, Markus T
2009-03-17 14:51             ` Metzger, Markus T
2009-03-17 15:15               ` Ingo Molnar
2009-03-18 18:08             ` Metzger, Markus T
2009-03-13 11:06 ` [tip:tracing/hw-branch-tracing] x86, bts: detect size of DS fields, fix Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090317123442.GB22759@elte.hu \
    --to=mingo@elte.hu \
    --cc=ak@linux.jf.intel.com \
    --cc=eranian@googlemail.com \
    --cc=hpa@zytor.com \
    --cc=juan.villacis@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markus.t.metzger@gmail.com \
    --cc=markus.t.metzger@intel.com \
    --cc=oleg@redhat.com \
    --cc=roland@redhat.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®