From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.205 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795948899; b=JosjrNtoEaqnh8ir7S9Aprx5ho5qR0oVVzp4hGd7ydvTv5yKkz9XWTm25YTcmhRAsTmg TglbzQ66lcCDJyPbcFb7tbHaW1163nS1fMRLh9ftbmG/N97x9y58W2eHDaGRnPVC0H9hx hYHeZ/y/sC2IcOU+SI+jNuPJNVKgingnq9jtbZL5suMneIhF6FtEhImoE4zHued3P/W0t Q8b1S7VoHvtu51DwachS16h91bQMxdlppjoh79eCu16596TBYxIrtThRnsHcChs6EwbNh BHm+CDtNfMuP0Y5Dhp7xovSgscb6ukqqDo24w65aAc/fUbfhdREDkOtUZ/7ahxmjaDA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795948899; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=+9aCJGwKfabovmFRUvn5k8wGjd4XhO1/pxjymHPXuoA=; b=efRoLFoSpgvxgjb5KBe5Q5eKoGtmYQxX//P/J84kdo6Dbt7MTTVTl8OnuBJ7/C5ZNhbz uwPzb1Ywgun+Y5X2rpeFlGXRv8nJ7eMLvfxTRdwhu7iuKx7jr5T2/H6ch7rZIVgxy2Pbd bQ+1DcWipyv2JsiIfQ10z1JcMaKf5UmB4IaF2F9HZu7fOnEHu+NFCaxyPUQMDFWsTjDku xPV8MeKYF71d7Z7Fuu6XA8DBWqyVRIwzZF7qEPFZgI6nKXpqu6hP+TNWRUbHTA2VANMra oibUylSZn4WCl+X8DPcbO3KywrU/TgcbC76L/Iq0M5ym8s5VOSPGZS6opDG9TPgmQIg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=Bh0fQYGA; arc=none smtp.remote-ip=95.215.58.205 Received: from mta1.migadu.com (out-205.mta1.migadu.com [95.215.58.205]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 94875606A31C for ; Sun, 29 Nov 2026 10:41:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 94875606A31C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=Bh0fQYGA X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=/mi8HfHpF4RjLAuQACP1rXTnimCx7XA5A8bfz7dNvQY=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1795948896; v=1; x=1796553696; b=Bh0fQYGAK4vLvFiuGmZN24aeikm062ea2nEzXYubPbQSITaQ0d5iHdDYoeEb5OnBKfVIQfPf HFEI6McVNUryDMl0Zvm5ImOi0wCKX2b55siQkcl3mdOMH2IC1NlGZXMZvLDeO3YN60A8Rupk81v JObD05Puo9bPnoLyRxmhkMu4= X-Envelope-To: linux-kernel@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id 2b1dcc61fbcec079; Sun, 29 Nov 2026 10:41:36 +0000 X-Mizu-Trace-ID: 2b1dcc61fbcec079 X-Migadu-Flow: FLOW_OUT Date: Sun, 29 Nov 2026 18:43:10 +0800 From: Chen Yu To: Reinette Chatre Cc: Chen Yu , tony.luck@intel.com, tglx@kernel.org, bp@alien8.de, mingo@redhat.com, dave.hansen@linux.intel.com, hpa@zytor.com, fenghuay@nvidia.com, babu.moger@amd.com, hongyu.ning@intel.com, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v10 09/12] fs/resctrl: Do not invoke smp_processor_id() in preemptible context Message-ID: References: X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Hi Reinette, On Wed, Nov 25, 2026 at 11:12:17AM -0800, Reinette Chatre wrote: > Hi Chenyu, > > Could you please move this patch to the beginning of the series, right after > "arm,x86,fs/resctrl: Move resctrl_arch_round_mon_val() out of line"? This is > the only patch from #3 to #12 that touches fs/resctrl and does not have any > dependencies on the patches that precede it. Folks only interested in > resctrl fs code can then just stop reviewing at patch #3. > I see, let me move it in next version. > On 11/5/26 2:09 AM, Chen Yu wrote: > > From: Tony Luck > > > > An event flagged with mon_evt::any_cpu is read directly in preemptible task > > context instead of being dispatched to a CPU of the monitoring domain. Only > > Intel AET events set this flag, so __mon_event_count() rejects an any_cpu L3 > > How is reader expected to know that an Intel AET event is not an L3 event? How about > something like: > > An event flagged with mon_evt::any_cpu is read directly in preemptible task > context instead of being dispatched to a CPU of the monitoring domain. Only the > Intel Application Energy Telemetry (AET) events set this flag, and they all > belong to the PERF_PKG resource rather than to L3. An any_cpu L3 event is thus Yes, this is clearer now. Let me add these descriptions in the next version. thanks, Chenyu > unexpected, so __mon_event_count() rejects it with WARN_ON_ONCE(). This lets the > L3 read paths call smp_processor_id() unconditionally to check that the current > CPU belongs to the domain being read. > > > event with WARN_ON_ONCE(). The L3 read paths can therefore call > > smp_processor_id() unconditionally to check that the current CPU belongs to the > > domain being read. > > > > MMIO-based LLC occupancy counters can be read from any CPU, so the L3 read paths > > have to tolerate an any_cpu event. Move that check into a helper which returns > > early for any_cpu events, avoiding smp_processor_id() in preemptible context. > > > > Signed-off-by: Tony Luck > > Signed-off-by: Chen Yu > > Tested-by: Hongyu Ning > > --- > Reinette >