From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=148.163.158.5 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796192558; b=bUAxoQtCHsh7x4aQ/f4xzrNMk5bzAEwU1QVEBDi4NJeO/aBX2kI3U6xSv4Rv/AZqy5Ll NhRsOnQ6W7rfte3bsHrnkUrLJWT0+MWStL+8AxsqFVbV2BSIR+CsdA0/RSxSPFBqw4Pw6 8E39SeiQUZrC5QJCEoDIATA7gK9ATp9jqjg3aGcdusmnfmGZ5HjM0HCeUJvTCTOXOdO2R /JMSrUQxuaYJmPbwpG8ekcjFio7p8xTPboSH5wqNB+kzAeuANnRheSNqa0XZPG6DJwdQN rBbHFnI9MU7Zjgb3gfVWN6AcvBNlsU61Y3sfrvZwUUHMTv5ZVUCUNAPQ06tZDhgMhcw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796192558; h=DMARC-Filter:Received:DKIM-Signature:Received:Received:Received: Received:Received:Received:Received:Message-ID:Date:MIME-Version: User-Agent:Subject:To:Cc:References:From:Content-Language:In-Reply-To: Content-Type:Content-Transfer-Encoding:X-TM-AS-GCONF: X-Proofpoint-Reinject:X-Proofpoint-Spam-Info:X-Authority-Analysis: X-Proofpoint-Spam-Details-Enc:X-Proofpoint-GUID: X-Proofpoint-ORIG-GUID:X-Proofpoint-Virus-Version: X-Proofpoint-Spam-Details; bh=cKTiaw399ZuFiopIctgKsoiV3X1UaolgKN583qOjbDw=; b=2kqXGGAywOThnIrlVwYAGjnzSaZOclRLgAR6RSo69w4+aGP3cTdDOHKHYVk8ME+11y4J skMHT/ExwVfDb/gXMfz3Oc1dhJ/YMHKOkTtMhBAvY11EiPtiOwAKswNnt+fr9IRNFDm9A Gh8HqbdjHtNAu2mUu+0sEwNt2UQ6MIhV8lefXhnpJ8+CLiy/jBNxugo2VxR9zzJaG+BFx 01yDPuOBa2un2Ow5Jq/PYmk8ZbaG6ks1afYuRJwN6cT5IcNZqC3hy0IIvJH6fgbiB7Ff1 3qxr5AxvVywL7XkUm+AsAQPYY0+YdIs9QfTzfO0MeeVK08gGMatNuFMn6B+fa4QM3UA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=JZALJGy8; arc=none smtp.remote-ip=148.163.158.5 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C4F18606A31A; Wed, 2 Dec 2026 06:22:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C4F18606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=JZALJGy8 Received: from pps.filterd (m0356516.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6B234uB03520089; Wed, 2 Dec 2026 06:22:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pp1; bh=cKTiaw 399ZuFiopIctgKsoiV3X1UaolgKN583qOjbDw=; b=JZALJGy8kcPYOMAxukIY3s 0vq41JANhWJWQ3DCEmwc78rEB1VhS+D73dKl7iIJO6rcA5X6V8gK9zaL05NLEjbM eLBwbq4iB4dNdqKBqju4i5PkkobGSEtjblIBUyIWfZQhyC6gZYdHmNcyoZcjVeCV 26HaNhNftNuqO0ymWawRKodNuYhqWex/kcTU8gZqn6jEog+BvSmQvtQTlqqYLtGw 4nbPoNFzatD69bV/Htgb7G6hxxKtQrJ3DfWOhn7so70cnaEvD2lJdAaezXV06eXZ p/y5g4PUeSx1krt5moIGoWzuCmcvmhhNb8LMPOsc6z5gJBGE8FyapbJe0LmRrVfA == Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4j7mckgjv0-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 02 Dec 2026 06:22:08 +0000 (GMT) Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.18.1.11/8.18.1.11) with ESMTP id 6B2348ki2443162; Wed, 2 Dec 2026 06:22:07 GMT Received: from smtprelay04.fra02v.mail.ibm.com ([9.218.2.228]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 4j9ujnkxxx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Dec 2026 06:22:07 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com [10.20.54.101]) by smtprelay04.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 6B26M5CF22938282 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 2 Dec 2026 06:22:05 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A26CB20043; Wed, 2 Dec 2026 06:22:05 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C8FA520040; Wed, 2 Dec 2026 06:21:59 +0000 (GMT) Received: from [9.124.209.81] (unknown [9.124.209.81]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 2 Dec 2026 06:21:59 +0000 (GMT) Message-ID: <66cb54ed-21d6-44e1-80d6-d122abc1d72a@linux.ibm.com> Date: Wed, 2 Dec 2026 11:51:58 +0530 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 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] Documentation/scheduler: Add cache aware scheduling documentation To: Tim Chen , Peter Zijlstra , Ingo Molnar , Jonathan Corbet Cc: Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , K Prateek Nayak , Chen Yu , Jemmy Wong , Randy Dunlap , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org References: <50a8055e38958cdc39e07435aaad56e4719b2bd3.1794507151.git.tim.c.chen@linux.intel.com> <7dd698a5-cbf6-446c-91ce-f026b46a6e18@linux.ibm.com> <3aae2e10d163775fa43490757cae20ee14e509e3.camel@linux.intel.com> From: Shrikanth Hegde Content-Language: en-US In-Reply-To: <3aae2e10d163775fa43490757cae20ee14e509e3.camel@linux.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-Reinject: loops=2 maxloops=12 X-Proofpoint-Spam-Info: AW1haW4tMjYxMjAyMDAyNCBTYWx0ZWRfX40/Do/P+S/tJ v2rlZw7Yz9vM+u7FAoMxzvnpzEEP2mWWlKvD6LxT3eSP5zDyYIqpLPLUGAhFstRizy6CWLmAz4E h5wLz5sVTZ36KXfeeOL/tm7lUzPJWQw= X-Authority-Analysis: v=2.4 cv=MtfHeGae c=1 sm=1 tr=0 ts=6b0fb910 cx=c_pps a=bLidbwmWQ0KltjZqbj+ezA==:117 a=bLidbwmWQ0KltjZqbj+ezA==:17 a=IkcTkHD0fZMA:10 a=pUM-KoujPXoA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=Y2IxJ9c9Rs8Kov3niI8_:22 a=VwQbUJbxAAAA:8 a=VnNF1IyMAAAA:8 a=ybFKEayJqL8N2gyf3SAA:9 a=QEXdDO2ut3YA:10 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjAyMDAyNCBTYWx0ZWRfX90cbmtvbsa8d shrtGeupgGX/pE5K1hNaXkxzC+/ZKu4bFVvcp3Afgl0DnpKMATevR0M+gSmuV6uxKUdEj2hLJHK 6vN2WVv8+d63lXClZx+fn14UI2hydL6fk4LxwhlI+rWHySa7COAW8XPXHgqHosSHbayJuxU5Nub WnOF/Qm3Ij3kvU78YLkVi7hj+mAei4qOan5nzOTNF9YabNsw23oU3JlolS11HZXZw9EXugaic/m 4/xI2rQYqovCsFynuElp80Bf3L+Z4P1TMOGyKncS5x64Uc49S1knVCnJctj0vDsotdwwtEuFOK2 WV+a/CQdozyLKm0YKk8LemZYjfZLXWWehdVP3w5piqlTX0SPs2U2X6Tpm+nFZzm/hej1BZFxdwF zFDf8UvwMG5nzujKEQR6zwrYtYAYhpeNRuN/aMXa7sKq/ms4J8AEfoWkoRt/hyhjQ5FfueutjTF HvB3yanaH4Moa4c0ceA== X-Proofpoint-GUID: c8yaz8tzshdgbPiohRsJUO2y6A9sGeL- X-Proofpoint-ORIG-GUID: YRR5jBChvuhIkFN05vcFFVORVA1eyeeZ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-12-02_01,2026-12-01_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 bulkscore=0 malwarescore=0 spamscore=0 phishscore=0 clxscore=1015 priorityscore=1501 lowpriorityscore=0 suspectscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2612020024 On 12/2/26 5:01 AM, Tim Chen wrote: > On Tue, 2026-12-01 at 23:27 +0530, Shrikanth Hegde wrote: >> Hi tim, A few nits. >> > > Shrikanth, > > Thanks for your review, much appreciated. > > >>> >>> diff --git a/Documentation/scheduler/index.rst b/Documentation/scheduler/index.rst >>> index 791178ac8bec..67cf466a169b 100644 >>> --- a/Documentation/scheduler/index.rst >>> +++ b/Documentation/scheduler/index.rst >>> @@ -16,6 +16,7 @@ Scheduler >>> sched-domains >>> sched-capacity >>> sched-energy >>> + sched-cache >>> schedutil >>> sched-util-clamp >>> sched-nice-design >> >> Should the new entry be added at the end? I don't think the above is sorted. > > Right, the list is not sorted. I put it after sched-domains, > sched-capacity and sched-energy on purpose, because those are the > other topology related documents and sched-cache.rst refers to the > same concepts. I would prefer to keep it there, but I don't feel > strongly about it. I can move it to the end if you or Jon prefer. > Almost all of them are related to each other :) I am okay with the current or at the end. Though I prefer at the end. But that's not my call. >>> +The LLC size is read from the generic cacheinfo framework. Architectures >>> +that do not populate it (currently PowerPC, which has its own cacheinfo >>> +implementation) report an LLC size of 0. When NUMA balancing is active, >>> +any non-zero footprint then fails the check of Section 5 (c), so cache >>> +aware scheduling is effectively disabled on these platforms. >> >> Hopefully below should help. >> >> https://lore.kernel.org/all/20261127152242.306333-1-sshegde@linux.ibm.com/#t > > Thanks, moving powerpc to the generic cacheinfo is the right fix. > I will drop the mention of PowerPC from this paragraph and keep only > the general statement, so the document does not become stale when > your series is merged. > Keep it there for now. I am not sure which one would get merged. If that series lands later, i will clean it up along with code comments. > >> >>> + >>> +8.4 - NUMA balancing >>> +^^^^^^^^^^^^^^^^^^^^ >>> + >>> +The footprint estimate of Section 5 (c) comes from NUMA balancing fault >>> +statistics. Without NUMA balancing, the footprint check is skipped, and >>> +groups with a working set much larger than one LLC can still be aggregated. >>> +With NUMA balancing, the scan is also limited to the relevant nodes, which >>> +reduces its cost on large systems. >>> + >>> +8.5 - Multithreading (SMT) >>> +^^^^^^^^^^^^^^^^^^^^^^^^^^ >>> + >>> +The thread limit of Section 5 (b) multiplies the number of running threads >>> +by the number of hardware threads per core. Thus, it effectively counts >>> +cores. On systems with many threads per core and small LLCs (for example >>> +SMT-4 with 4 CPUs per LLC), almost every multi-threaded process fails this >>> +check unless aggr_tolerance is raised. >> >> Due to above restriction is there a merit in adding a "status" debugfs entry >> either per-proc or in llc_balancing where it indicates if the llc_balancing is >> effectively disabled due to above HW limitations. > > I agree that it is hard to tell today why a process is not > aggregated. The cases are a bit different though: > > - No sched domain partition spans more than one LLC. This is a global > state. It is only reported in dmesg with sched_verbose today, and > reading "enabled" returns what the user asked for, not what is in > effect. A read-only file in llc_balancing/ could show it. > > - llc_bytes is 0. This is per LLC domain, so it would fit better in > the per domain debugfs directory. Your cacheinfo series should > remove the main case anyway. > > - The SMT / LLC size limit above. This is not really a hardware > state. It depends on nr_running_avg of each process and on > aggr_tolerance, so a global file cannot report it. It would need > something per process. > I guess we can start with this, if per proc shows disabled. Since global is somewhat covered. If a need arises, can be added. > This is a code change, so I would like to keep it out of this > documentation series for now and look at it as a follow-up. > > Tim > Ack. It is beyond the scope of this series. I had thought of this since most users would see enabled and expect it to work, only to realize later it isn't. Also figuring that out needs explicit tracing.