public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Christopher Covington <cov@codeaurora.org>
Cc: Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] RFC: perf: Make overflow signals inheritable
Date: Mon, 7 Jul 2014 11:13:08 +0200	[thread overview]
Message-ID: <20140707091308.GH6758@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1403727129-20665-1-git-send-email-cov@codeaurora.org>

[-- Attachment #1: Type: text/plain, Size: 1240 bytes --]

On Wed, Jun 25, 2014 at 04:12:09PM -0400, Christopher Covington wrote:
> In order to get a signal from the perf events framework (use an
> "event_limit"), one must not not only call perf_event_open() with the
> appropriate sample_period, watermark, and wakeup_watermark values,
> but also set the FASYNC flag on the resulting file descriptor with
> fcntl(). 

Tell me more; why are you wanting this?

> If the inherit attribute is also set, one would expect child
> tasks to cause signals like their parents. They don't, though,
> because their FASYNC setting isn't set (and can't be by the user
> since only the parent has a file descriptor). To fix this, allow the
> parent's FASYNC value to be passed along to child events when the
> inherit attribute is set. Overflow counts are still per process and
> per CPU.

There's more issues though; the comment you deleted isn't explicit about
this (it maybe should have been).

This would mean the inherited children would get signals; they might not
be expecting them.

When they do get a signal, they should be calling IOC_REFRESH to re-arm
the signal, but that explicitly doesn't work for inherited events. Which
leads me to believe you didn't actually test this.

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2014-07-07  9:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-25 20:12 [PATCH] RFC: perf: Make overflow signals inheritable Christopher Covington
2014-07-07  9:13 ` Peter Zijlstra [this message]
2014-07-08 15:54   ` Christopher Covington

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=20140707091308.GH6758@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=acme@kernel.org \
    --cc=cov@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=paulus@samba.org \
    /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