mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Kyle Huey" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Kyle Huey <khuey@kylehuey.com>, Ingo Molnar <mingo@kernel.org>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: perf/core] perf/ring_buffer: Trigger IO signals for watermark_wakeup
Date: Sun, 14 Apr 2024 20:47:10 -0000	[thread overview]
Message-ID: <171312763097.10875.3668318921597821479.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20240413141618.4160-3-khuey@kylehuey.com>

The following commit has been merged into the perf/core branch of tip:

Commit-ID:     fd20bb51ed3913e0d25085eb79e8c0babfb4ee28
Gitweb:        https://git.kernel.org/tip/fd20bb51ed3913e0d25085eb79e8c0babfb4ee28
Author:        Kyle Huey <me@kylehuey.com>
AuthorDate:    Sat, 13 Apr 2024 07:16:18 -07:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Sun, 14 Apr 2024 22:26:32 +02:00

perf/ring_buffer: Trigger IO signals for watermark_wakeup

perf_output_wakeup() already marks the perf event fd available for polling.
Trigger IO signals with FASYNC too.

Signed-off-by: Kyle Huey <khuey@kylehuey.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20240413141618.4160-3-khuey@kylehuey.com
---
 kernel/events/ring_buffer.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/kernel/events/ring_buffer.c b/kernel/events/ring_buffer.c
index 60ed43d..4013408 100644
--- a/kernel/events/ring_buffer.c
+++ b/kernel/events/ring_buffer.c
@@ -22,6 +22,10 @@ static void perf_output_wakeup(struct perf_output_handle *handle)
 	atomic_set(&handle->rb->poll, EPOLLIN);
 
 	handle->event->pending_wakeup = 1;
+
+	if (*perf_event_fasync(handle->event) && !handle->event->pending_kill)
+		handle->event->pending_kill = POLL_IN;
+
 	irq_work_queue(&handle->event->pending_irq);
 }
 

  reply	other threads:[~2024-04-14 20:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-13 14:16 [PATCH v3 0/3] perf: " Kyle Huey
2024-04-13 14:16 ` [PATCH v3 1/3] perf: Move perf_event_fasync() to perf_event.h Kyle Huey
2024-04-14 20:47   ` [tip: perf/core] " tip-bot2 for Kyle Huey
2024-04-13 14:16 ` [PATCH v3 2/3] perf/ring_buffer: Trigger IO signals for watermark_wakeup Kyle Huey
2024-04-14 20:47   ` tip-bot2 for Kyle Huey [this message]
2024-04-13 14:16 ` [PATCH v3 3/3] selftests/perf_events: Test FASYNC with watermark wakeups Kyle Huey
2024-04-14 20:47   ` [tip: perf/core] " tip-bot2 for Kyle Huey

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=171312763097.10875.3668318921597821479.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=khuey@kylehuey.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=x86@kernel.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

all inboxes | Powered by JetHome®