Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp524585lqp; Sat, 13 Apr 2024 07:17:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVM8FcUj8dPyQfDA8gs1Zzf5msQERKt8yK1j6c4flGwZDKvHq7kfXhDKNx2+Cz1jkoVRT1J1n58/z53h1P6/M64kPcKX0JQg3Z8JAcrsA== X-Google-Smtp-Source: AGHT+IFko9/HBTuHb2DoqmvP+Bqnoc/jj4ssKpwkdB/R4qdDKIxZngt8QN7Rudc9hTOv/9OoV4XF X-Received: by 2002:a50:8d53:0:b0:56c:be3:7cef with SMTP id t19-20020a508d53000000b0056c0be37cefmr3788990edt.11.1713017828615; Sat, 13 Apr 2024 07:17:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713017828; cv=pass; d=google.com; s=arc-20160816; b=tqHfWGWhxudmhTuHnZYd+RslMBYsg0KFfozf10iWYA1qqiE6p/gFCOBuL+vYVuFB6m r7BS2S/jrI9g71+FQTXNCba7GdMoKE9TB4VPgBLr3WDcKI0CVpMhUpmZbMNKxqSvHDA7 Zjy0uVcjx4g3fJb/v6C3u+CT7+gCNY5A8Fzrzg9ninlGYYgvuCbxjRP/l8OCEy6F/0h6 lUti7D4t3YFfBed10R8rrlEN1rxD/CnZows7bFW0sn/8Dp+TBlHkxndN6aPwgZe1L7GY 1uUjgHnzTDGhT4fK1rrfp6L9zFxbXKumw/FCVDos35BrA4dINb/MdvtOFSh6ibxW+CYf 1C4g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=wDrdykoIXMbP7phUYiJI1yePs0EFYaz2XrXDwzySQjw=; fh=OZactpSUJSOlx/uIXkN+yQhI64Z7Wq4+tn6kFfpnjDs=; b=SXpKfa5PH1Dct0uOzEPgE8bgTdY0LrGk85JxHw5SsIYpXQUwiFpSirLnYyEf9uunW3 vZHEnNF6UsB7mbATWWi0yO1xKGOT7eE6ctOSrlWP2iRSpWYdn2R0pB0f1mS7o+zxhmrN 5WBc5VRRbCrvxqF5hkAzwnCO5NribWr/dnqkJNNTBKIxsrY3AE2lYJh43o/gLUOI6b3/ 6aA8PupKBs0tWyf8KbKtF3OmSrFH7CpYm71sYsiUoyUFx6oRVL4hstcP1ao+HlGJd6ha Kzkz9sK0Kb2QOCnaJHFBnmyj1z9wGRndM/Nd9HltG8cXCR7C2vJUlmWaOoWQQU1Oqggz yqFQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kylehuey.com header.s=google header.b=cAPy4kkf; arc=pass (i=1 spf=pass spfdomain=kylehuey.com dkim=pass dkdomain=kylehuey.com); spf=pass (google.com: domain of linux-kernel+bounces-143748-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143748-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id w12-20020a05640234cc00b0056bb554e345si2740838edc.447.2024.04.13.07.17.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Apr 2024 07:17:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-143748-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kylehuey.com header.s=google header.b=cAPy4kkf; arc=pass (i=1 spf=pass spfdomain=kylehuey.com dkim=pass dkdomain=kylehuey.com); spf=pass (google.com: domain of linux-kernel+bounces-143748-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143748-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 4EC971F21A31 for ; Sat, 13 Apr 2024 14:17:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5A700446A2; Sat, 13 Apr 2024 14:16:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kylehuey.com header.i=@kylehuey.com header.b="cAPy4kkf" Received: from mail-yb1-f180.google.com (mail-yb1-f180.google.com [209.85.219.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 476F23FB1B for ; Sat, 13 Apr 2024 14:16:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713017811; cv=none; b=j/lPEjayTI+eUvAUSPVcLVpiiSRReaoc7HLjlvt181Qmb13c9DbaHaYLOx8VwdiBLKmE+EC0eXQBxcWaozlGW+z23j+CiBxEG2/8q06RWHY3FUaBjUpDsbLGTPMBdJQLbEylYwHnCi9gzBEjoudtwbLmXSGgUXsiTlC4MWu8HGE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713017811; c=relaxed/simple; bh=DU50FXhrCuqhtNLOaapUXMuCslN3deTrvJGkJumTsUM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=U/BJ3VDPpjtGmmiMUMhdRBYZ6eDtyLHJzyuPGGtou0uS8xhYb6AK9ldhESTzT/+qrn2ry1g8ZI8IMKqGPkwjR1UwQGTFsIA5BdsfbElaXvlZQI5azOVqMu7pCE6RJdekOcUHhn+xUT0IgGGtqbNXbJJXutu9QEbZw9tC212Q6sQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylehuey.com; spf=pass smtp.mailfrom=kylehuey.com; dkim=pass (2048-bit key) header.d=kylehuey.com header.i=@kylehuey.com header.b=cAPy4kkf; arc=none smtp.client-ip=209.85.219.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylehuey.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kylehuey.com Received: by mail-yb1-f180.google.com with SMTP id 3f1490d57ef6-db4364ecd6aso1969195276.2 for ; Sat, 13 Apr 2024 07:16:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kylehuey.com; s=google; t=1713017809; x=1713622609; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wDrdykoIXMbP7phUYiJI1yePs0EFYaz2XrXDwzySQjw=; b=cAPy4kkfSUmZR+hXckSUlPaaef5IwNiFk1XkRTaHmRByL/XdYZzAVkZQw3fQ2RkU/H PDsFtC1QBrJ9aFBk8g878ctQYK/V6YLzMLkGl0Bqrmka7nOk6KnPPPSK9Y+/W5bSPOsu OIUwymznFCGbP2wHqXfzNSAtBsk0cx7S885WCO1ru/X2bHU3PpZmG+3AMw8wNkDIu8QJ QaxuE71FaXyggY+CpM3JqIe77nuRMXEts1Msn9AqGrANKZSrW94MYnYaQJJ3s8BRTcR7 fjd+LFixychMnKqi8syz/vjfg2/8v/WobLdfYLEIB423mgOOYi5x1r3Rnd8OWWVEIZts 7f3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713017809; x=1713622609; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wDrdykoIXMbP7phUYiJI1yePs0EFYaz2XrXDwzySQjw=; b=iJHc7KAPg+b7MDWHito1NGwOlVZU/tA5TEJ69oO8dqdc92bfkt5XyTtxZ5VhicGIxZ 5WtRz0WVO8LdHDSUMcGSt+Ni6p7Bwpb+vFN7cLOSdBI977ZNkU05XrOJcfOojQ1yQTLn Vd+o9L6Xj6/B/Mz3mave8OEtk8uRpj8zSNmt++rtNvZsjEv+7h2t9HPF578rr8ayhwY4 iqqTZKYLsuBlkOXram8RHVCTkcU1qUm4Vg38Obz20Zl21+FWtCM8wDluQPZB27aCmWR5 kP1xsJ3ScUpEoR4CUFEhnmY+WvjtG8sOfes2bWz7t52daSv/x7muogto81x5ALZieTtD 5tOg== X-Forwarded-Encrypted: i=1; AJvYcCXgydomgYQtza5GFmraTvYXvbjraokRLOD9wf+yE94Y2uyzLpkcSwMs3AkQ5oYTpUhH2vLLaKbREWjSM4qM7XnnQW6L181G/y0iEP2S X-Gm-Message-State: AOJu0Yx/eyh7TmAdZCoNHgc4GpciK2Sqt2Ow3yIyP6GGAyme6I8Ct4uf Sq9ICCPLWDA4ubRz90KnFstHeACdSVcmyGoaF43IxigWWB0D5dVXqjTsLVn6jw== X-Received: by 2002:a5b:890:0:b0:dc7:4460:878a with SMTP id e16-20020a5b0890000000b00dc74460878amr4899160ybq.3.1713017809304; Sat, 13 Apr 2024 07:16:49 -0700 (PDT) Received: from ip-172-31-11-157.us-east-2.compute.internal (ec2-3-145-99-109.us-east-2.compute.amazonaws.com. [3.145.99.109]) by smtp.googlemail.com with ESMTPSA id v5-20020a254805000000b00dcdb6934617sm1193349yba.62.2024.04.13.07.16.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Apr 2024 07:16:48 -0700 (PDT) From: Kyle Huey X-Google-Original-From: Kyle Huey To: Kyle Huey , linux-kernel@vger.kernel.org, Namhyung Kim , Ian Rodgers , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo Cc: Robert O'Callahan , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , linux-perf-users@vger.kernel.org Subject: [PATCH v3 2/3] perf/ring_buffer: Trigger IO signals for watermark_wakeup Date: Sat, 13 Apr 2024 07:16:18 -0700 Message-Id: <20240413141618.4160-3-khuey@kylehuey.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240413141618.4160-1-khuey@kylehuey.com> References: <20240413141618.4160-1-khuey@kylehuey.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit perf_output_wakeup() already marks the perf event fd available for polling. Trigger IO signals with FASYNC too. Signed-off-by: Kyle Huey --- 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 60ed43d1c29e..4013408ce012 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); } -- 2.34.1