mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Vince Weaver <vincent.weaver@maine.edu>
Cc: linux-kernel@vger.kernel.org, Paul Mackerras <paulus@samba.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>
Subject: Re: perf: PERF_FLAG_FD_OUTPUT has been broken since 2.6.35
Date: Tue, 13 Jan 2015 10:36:03 +0100	[thread overview]
Message-ID: <20150113093603.GK23965@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <alpine.DEB.2.11.1501091123040.27178@vincent-weaver-1.umelst.maine.edu>

On Fri, Jan 09, 2015 at 11:26:54AM -0500, Vince Weaver wrote:
> 
> On Fri, 9 Jan 2015, Peter Zijlstra wrote:
> > > So is this worth fixing seeing as apparently no one uses this feature?
> > 
> > I think there's a fair argument for removing it, Ingo, Acme?
> 
> could the functionality be replaced with a subsequent call to
> 	ioctl(PERF_EVENT_IOC_SET_OUTPUT)

Yes.

> Although I suppose there's a possibility for losing a small amount of data 
> or some other reason that PERF_FLAG_FD_OUTPUT was introduced in the first 
> place.

That's a natural race without solution. That is, because there is no
serialization between the sys_perf_event_open() and any possible acts of
data generation, we can't even talk about loosing data.

Even if it were all in a single syscall, there is no saying how long
that syscall would take to complete -- imagine its stuck on memory
allocation or whatnot. Similarly you could have issued the syscall a wee
bit later or whatnot.

> In addition, if we remove PERF_FLAG_FD_OUTPUT would there then be any 
> reason to keep PERF_FLAG_FD_NO_GROUP around?

Good point, I think there was another potential user of that proposed
recently, but I can't quite remember where or what. Let me try and go
find that.

  parent reply	other threads:[~2015-01-13  9:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-08 15:22 Vince Weaver
2015-01-09 16:00 ` Peter Zijlstra
2015-01-09 16:26   ` Vince Weaver
2015-01-09 23:17     ` Arnaldo Carvalho de Melo
2015-01-13  9:36     ` Peter Zijlstra [this message]
2015-01-13 11:56       ` Arnaldo Carvalho de Melo

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=20150113093603.GK23965@worktop.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=acme@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=paulus@samba.org \
    --cc=vincent.weaver@maine.edu \
    /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

Powered by JetHome