public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: "Metzger, Markus T" <markus.t.metzger@intel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"oleg@redhat.com" <oleg@redhat.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"mingo@elte.hu" <mingo@elte.hu>,
	"linux-tip-commits@vger.kernel.org" 
	<linux-tip-commits@vger.kernel.org>
Subject: RE: [tip:tracing/core] Revert "x86, bts: reenable ptrace branch trace support"
Date: Thu, 11 Jun 2009 10:08:55 +0200	[thread overview]
Message-ID: <1244707735.6691.16.camel@laptop> (raw)
In-Reply-To: <928CFBE8E7CB0040959E56B4EA41A77EBBC6546E@irsmsx504.ger.corp.intel.com>

On Thu, 2009-06-11 at 08:17 +0100, Metzger, Markus T wrote:
> >That would indeed keep the proposed ABI workable, what I'm still not
> >liking is that this buffer is in-kernel, but I guess that might be
> >something for other people to have an opinion on.
> 
> The alternative would be to give a user-allocated buffer to the tracing h/w.
> 
> We would need to take precautions to prevent the user from messing around
> with that buffer while the h/w is writing to it. Other code uses the kernel-
> allocated buffer plus copy_to_user() approach, as well.
> 
> Further, it would require the user to interpret the various tracing formats,
> whereas the existing interface provides an architecture-independent format.
> 
> 
> Does anybody have concerns on using an in-kernel buffer and providing a 
> copy_to_user() interface?

Ah, if you mmap() you can do without copy_to_user().

Either way, you have to make sure the buffer is mlocked() anyway, since
you're wanting to fill it from interrupt context.

The advantage (imo) from letting the user set it up is that you don't
need those separate allocation routines.

But yes, it would expose the data to the user, but one could keep it
opaque data, without requiring the user to be able to interpret it.

Of course a data format aligned with the interface capabilities would be
nicer ;-)


  reply	other threads:[~2009-06-11  8:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <tip-511b01bdf64ad8a38414096eab283c7784aebfc4@git.kernel.org>
2009-06-11  6:30 ` [tip:tracing/core] Revert "x86, bts: reenable ptrace branch trace support" Metzger, Markus T
2009-06-11  6:36   ` Peter Zijlstra
2009-06-11  7:17     ` Metzger, Markus T
2009-06-11  8:08       ` Peter Zijlstra [this message]
2009-06-11  8:30         ` Metzger, Markus T
2009-06-11 10:21     ` Ingo Molnar
2009-06-11 10:39       ` Metzger, Markus T
2009-06-11 21:41         ` Ingo Molnar
2009-06-12 11:04           ` Metzger, Markus T
2009-06-18 10:23             ` Metzger, Markus T
2009-06-24 13:10               ` Metzger, Markus T
     [not found]                 ` <20090624133645.GE6224@elte.hu>
     [not found]                   ` <928CFBE8E7CB0040959E56B4EA41A77EBE2DB9B9@irsmsx504.ger.corp.intel.com>
     [not found]                     ` <20090624153229.GA24346@elte.hu>
     [not found]                       ` <928CFBE8E7CB0040959E56B4EA41A77EBE2DC3D9@irsmsx504.ger.corp.intel.com>
     [not found]                         ` <20090626122948.GC10850@elte.hu>
     [not found]                           ` <928CFBE8E7CB0040959E56B4EA41A77EBE519869@irsmsx504.ger.corp.intel.com>
     [not found]                             ` <20090629202002.GF31577@elte.hu>
2009-06-30  7:32                               ` bts & perf_counters Metzger, Markus T
2009-06-30 19:32                                 ` Ingo Molnar
2009-07-06 15:34                                 ` Peter Zijlstra

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=1244707735.6691.16.camel@laptop \
    --to=peterz@infradead.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=markus.t.metzger@intel.com \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=oleg@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