From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DB15A38F244 for ; Tue, 19 May 2026 09:11:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779181904; cv=none; b=sqyQxf6HJooZdxb6A6ZTpsO1OjQiMGxBRvh5K4quDL3mCwlqECpNQVXSRbYV5nUaXcG7+RqX1coVvmEyt1hoRX+UgpFm65j1r5BXpuHaI/6mKudV6LekGup0Y0g7iaVJYq8v6ZJ6oGfZBpv5OmzKYhB5jErUzgPYmtNZWKcG+o4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779181904; c=relaxed/simple; bh=KD4l9HOJO5YtEA+taLUZCZ6XOJw7pcJRLhUj9ht7fKo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=vDtX68NS2+Cm1/Ela7b/GaLCuBuatA208hSPhXoKfhiXLpVdrbeDEqiQ/dkow0TotNn1J/PkgdPSD6t7nu8ARf5+MPjArulz9oNWdhIT/MaTv7ZbXmRwa2IpGg2F++8i6Ekjs/7Xzo3xqyNOvN8KkM66DJ8T0lapuZNzCOZRQrQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=mf5X1ZKr; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="mf5X1ZKr" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=t/F4rTo/1W38KkqVFV5htHAH+HAPLDwzYlm3KOi9ZrY=; b=mf5X1ZKra2+UBg9vbIdtT3dmvj yFB54IiBfjqxXbchBrW9oCjpvKC1+UbIAAPvS6N1YQ/3XR+7WpL7OyRGLSJmeGmkme6h1H/ASpLNC 8pijS7cMypWQzvZBTbq4tItmWlsUAQBVaXTNHQksgeKnrumvGFG0RxoRdj+ChC3XN12rA9s1qgkUq cwpjs0VmeyF6mdmvxHOV9xNZ63nEbEYkt/EfiNbRPPfDu/3jd+TAzx6ZaWgaQOPGcj1CiPUJXUoYq rbGi8CZPwQyvHgD4pvLPoEp4/BghvGEnBjHgOiHfQI5lHAyHd7HS5GPK7lj6n8xUEIzQq1z6VA4Qy ADnEWDdA==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.99.1 #2 (Red Hat Linux)) id 1wPGUE-00000005hUJ-1BIK; Tue, 19 May 2026 09:11:38 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 6A3FE300182; Tue, 19 May 2026 11:11:36 +0200 (CEST) Date: Tue, 19 May 2026 11:11:36 +0200 From: Peter Zijlstra To: Adrian Hunter Cc: =?utf-8?B?0JrQvtC90YHRgtCw0L3RgtC40L0g0JzQuNGF0LDQudC70L7Qsg==?= , Mark Rutland , linux-kernel@vger.kernel.org Subject: Re: perf AUX: race causes poll() hang Message-ID: <20260519091136.GA3102624@noisy.programming.kicks-ass.net> References: <20260518094121.GT3102624@noisy.programming.kicks-ass.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, May 19, 2026 at 08:58:52AM +0300, Adrian Hunter wrote: > > @@ -7612,10 +7620,8 @@ static void __perf_pending_disable(struct perf_event *event) > > * Yay, we hit home and are in the context of the event. > > */ > > if (cpu == smp_processor_id()) { > > - if (event->pending_disable) { > > - event->pending_disable = 0; > > + if (event->pending_disable) > > At this point, can _perf_event_enable() on another CPU decide > to do nothing ("Already running, nothing to do"), but then the > disable below contradicts that? Should be serialized on ctx->lock IIRC > > perf_event_disable_local(event); > > - } > > return; > > } > > >