linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>
Cc: "Vince Weaver" <vincent.weaver@maine.edu>,
	"Mikołaj Kołek" <kolek.mikolaj@gmail.com>,
	"Alejandro Colomar" <alx@kernel.org>,
	linux-man@vger.kernel.org, linux-perf-users@vger.kernel.org
Subject: Re: perf_event_open.2: mmap ring buffer requirement for receiving overflow notifications
Date: Mon, 2 Dec 2024 12:53:56 -0800	[thread overview]
Message-ID: <Z04eZN4Cpbqw4Rpe@google.com> (raw)
In-Reply-To: <00910b8e-fdaf-45ae-8dcc-8c926d7fce65@maine.edu>

Hi Peter and Ingo,

On Tue, Nov 26, 2024 at 05:13:45PM -0500, Vince Weaver wrote:
> On Sat, 23 Nov 2024, Mikołaj Kołek wrote:
> 
> > findings. In the MMAP layout section of the page, you can find this
> > sentence:
> > Before Linux 2.6.39, there is a bug that means you must allocate
> > an mmap ring buffer when sampling even if you do not plan to
> > access it.
> > Unless I'm somehow misunderstanding it, this statement does not seem
> > to be well worded, or alternatively this bug does not seem to be
> > fixed.
> 
> That text was probably written by me.
> 
> I tried looking at the 2.6.39 code, my perf_tests, and also PAPI which was 
> where the problem was probably noticed but I can't find a firm reference 
> for how the issue was fixed.
> 
> If I recall, the problem was if you were trying to create a sampling event 
> without mmap (say you want to get a signal every 100,000 retired 
> instructions, but you don't actually want any sample data).  I think 
> before 2.6.39 if you tried setting that up you'd get some sort of error 
> (an EINVAL?) when trying to start(?) the event.
> 
> It is possible this wasn't fixed.  I tried to be pretty good 
> about putting relevant git commits as comments in the manpage but there 
> doesn't seem to be one for that part of the text.  I'm guessing it was 
> PeterZ doing the work on this so maybe he remembers.

Do you remember what was the issue exactly on sampling events w/o mmap?

Thanks,
Namhyung


  reply	other threads:[~2024-12-02 20:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-23 20:49 perf_event_open.2: mmap ring buffer requirement for receiving overflow notifications Mikołaj Kołek
2024-11-23 21:29 ` Alejandro Colomar
2024-11-26  5:42 ` Namhyung Kim
2024-11-26 10:15   ` Alejandro Colomar
2024-11-26 22:13 ` Vince Weaver
2024-12-02 20:53   ` Namhyung Kim [this message]
2024-12-04 12:28     ` Peter Zijlstra
2024-12-04 19:30       ` Namhyung Kim

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=Z04eZN4Cpbqw4Rpe@google.com \
    --to=namhyung@kernel.org \
    --cc=alx@kernel.org \
    --cc=kolek.mikolaj@gmail.com \
    --cc=linux-man@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.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;
as well as URLs for NNTP newsgroup(s).