From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out203-205-221-245.mail.qq.com (out203-205-221-245.mail.qq.com [203.205.221.245]) (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 AE39833B6E9 for ; Fri, 19 Dec 2025 14:49:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.205.221.245 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766155748; cv=none; b=fn9y5gIP1SRSey8FD+OmP5ONOYmtx/t+1WnifYn+GlWrMMnGun5kO0zMuM5JMAxfA/o503sl0C4jgNoyaNG6N5vFZzVY/WmTK3NyN79Rn5C0ahJ/dZOHvjuHa3x1UrCAsy5m6PQ+wjIWnXH9E9OQSK8eGU2tY8B0ji6UiYteLvc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766155748; c=relaxed/simple; bh=Q/2vpS7obpmch0lSQdyBU5vcduMZokpdTAvK2xsmcUc=; h=Message-ID:Content-Type:Mime-Version:Subject:From:In-Reply-To: Date:Cc:References:To; b=N3zKNHkkgqs/4JJk3Ed8PtqCKQWDbpjH2dkMCzaYRSAul+xzK8QJsoPUdhKCgEELzfJrCH7WuQ9eYzH3KpwLllvblSkaqctdP1/2jT/3NVk87dVUDMyIDKAVD114D/+xaogx+gBKbolwYndWa6nnKLQ1qxtj4L7ZejWVWD3tOv8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=cyyself.name; spf=pass smtp.mailfrom=cyyself.name; dkim=pass (1024-bit key) header.d=qq.com header.i=@qq.com header.b=caD+fEW/; arc=none smtp.client-ip=203.205.221.245 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=cyyself.name Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cyyself.name Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=qq.com header.i=@qq.com header.b="caD+fEW/" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1766155731; bh=Q/2vpS7obpmch0lSQdyBU5vcduMZokpdTAvK2xsmcUc=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=caD+fEW/GcoQTwRziKtwuZmEMrqq3uMyu1/Cbkp1I+Q6pbJ5k7brnwE4kWJb3fXoh q04ijfI/BZ5+oDSWugmGFXTZABQHfOWkYtjTjFdzOpTxvHPou/RK7irdhy+WhPyyip RcXi0zcWBPkBVCcKGwbktTBEYWORn3F0TGEanNPE= Received: from smtpclient.apple ([2408:8207:18a2:b280:b1a3:eb2a:65fb:ad66]) by newxmesmtplogicsvrszb43-0.qq.com (NewEsmtp) with SMTP id C2EAF6D6; Fri, 19 Dec 2025 22:48:46 +0800 X-QQ-mid: xmsmtpt1766155726tgo96ch0c Message-ID: X-QQ-XMAILINFO: MhK4DKsBP06iAwHXWPW3HAKOcog7Dgb1LzS0YqaPDqKHJhQO2/SBiUpJ7//YXT jaU6E9H15rbVDZM2i9m0La4C+mJ/N+UFvn0V0OXZn4hg/A4sUh9F5yqF+g/RHwMJY1ZcgJHBVj+9 C60i9fbkmL+b/1/fsu4y/De4nVSsayHyowILzI8rlyBfSe+7M0pBmlHSUk04ThbV1kOAImXb/Zed 4IOcprbjMbPhRZhclQi0RX4A8SIIQpb5RRT17WSuRjnXYK+5TMUjzI2wZrbWJYe01cRCOo0Ig91R HVyXR4SWEpQ8gvi2QgOyQsbHALT040qZgjUoqx9WjhgaQiaF+VoBCWv8SI1lPByE2/36HCZHoExZ k6kbx6zbkmPKa7Z7Gq+dfdC0Ft8eoXT3ivxUZo/cRfJigEUYjikQVgszzwZIIu3lhwZO1XkvJKr0 m8dyI3+W0lNMx02QpY5eXd1v4hIe57osMNA59NNO9/+8dAPVNCJzcDQDDHAiWekIP4Z0SAIPhRk4 LTRnIVY69Yg65Crty6RWKUjpEm02NaPkvdf3f1cha0VA3PeyblIiya3NTbH0vfkUTiKRVpLLnnL0 eNHxZmmI17h4vxO6EjrKDudQqmxd+7rUEv36nsSpMWX4nQOdNFUaGigED6UvhxqAOq3dOpPbbPGd fLsN/A2X8GhGEWNt65tTsgFBJy1D0RPa9crZpKUptirdNK86WE2jJjOpeFjqg9uH4E+iXUupXK6a vAINbfoWgutQMYV4JvLK/be/4qQ2gx+535NZ/zncie6YolvyQK+RZH94j66zEtU98xJKn9aTkopk q668hdVmD90ZqjVolv88+f/nBpbnbVVP8VqRsfYswu/+SPa8docFC9aIM9DDcEAdaLiAso51E4HR DHp03W9soqGNSIFx2A8KSyVoCVYB5TuakfVe2G0BN32yKc5jH2zFh2RrfNuMSVZ5A8NDALnHdQry teVYmqVhgv/+N3iwlnyfhQipeFm1GlWXwd3/dhHxU+S8ft62SSdygXbCuL7VqWoFmYpd/SLu6Wjx G5i28O4ny4fPForxJxMKoXkbM2l7LbqWhdcDA/vOii0MXK5WpggxiOt6hSAjZ67ag24avr/A== X-QQ-XMRINFO: NI4Ajvh11aEj8Xl/2s1/T8w= Content-Type: text/plain; charset=utf-8 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.200.81.1.6\)) Subject: Re: [PATCH v2 21/23] -- DO NOT APPLY!!! -- sched/cache/stats: Add schedstat for cache aware load balancing From: Yangyu Chen In-Reply-To: Date: Fri, 19 Dec 2025 22:48:36 +0800 Cc: Tim Chen , Peter Zijlstra , Ingo Molnar , K Prateek Nayak , "Gautham R . Shenoy" , Vincent Guittot , Juri Lelli , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , Madadi Vineeth Reddy , Hillf Danton , Shrikanth Hegde , Jianyong Wu , Tingyin Duan , Vern Hao , Vern Hao , Len Brown , Aubrey Li , Zhao Liu , Chen Yu , Adam Li , Aaron Lu , Tim Chen , linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable X-OQ-MSGID: <15858C00-9FF0-4BC5-B5AB-1A790A1244A4@cyyself.name> References: <71b94a7547f7843230270e20b84ecb0a540ab604.1764801860.git.tim.c.chen@linux.intel.com> To: "Chen, Yu C" X-Mailer: Apple Mail (2.3864.200.81.1.6) > On 19 Dec 2025, at 22:41, Chen, Yu C wrote: >=20 > On 12/19/2025 1:03 PM, Yangyu Chen wrote: >>> On 4 Dec 2025, at 07:07, Tim Chen = wrote: >>>=20 >>> From: Chen Yu >>>=20 >>> Debug patch only. >>>=20 >>> With cache-aware load balancing enabled, statistics related to its = activity >>> are exposed via /proc/schedstat and debugfs. For instance, if users = want to >>> verify metrics like the number of exceeding RSS and nr_running = limits, they >>> can filter the output of /sys/kernel/debug/sched/debug and compute = the required >>> statistics manually: >>>=20 >>> llc_exceed_cap SUM: 6 >>> llc_exceed_nr SUM: 4531 >>>=20 >>> Furthermore, these statistics exposed in /proc/schedstats can be = queried manually >>> or via perf sched stats[1] with minor modifications. >>>=20 >> Hi Tim, >> This patch looks great, especially for multithread Verilator = workloads >> on clustered LLC (like AMD EPYC). I'm discussing with Verilator >> upstream to disable automatic userspace affinity assignment in >> Verilator if such feature exist [1]. During the discussion, I think >> there should be a way for userspace software to detect if such a >> feature exists. Could we expose it in `/proc/schedstats` to allow >> userspace software to detect such a feature? We can just use this >> patch and remove the "DO NOT APPLY" tag. >=20 > Thanks for the test Yangyu. Does /sys/kernel/debug/sched/llc_enabled > work for you? It requires debugfs being mounted with enough permissions. It=E2=80=99s = not feasible for normal user-space software without root permission. Thanks, Yangyu Chen > Anyway we can try to include /proc/schedstats as the formal one > in the next version. >=20 > Thanks, > Chenyu >=20 >> [1] = https://github.com/verilator/verilator/issues/6826#issuecomment-3671287551= >> Thanks, >> Yangyu Chen