mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shrikanth Hegde <sshegde@linux.ibm.com>
To: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	driver-core@lists.linux.dev
Cc: sshegde@linux.ibm.com, christophe.leroy@csgroup.eu,
	maddy@linux.ibm.com, gregkh@linuxfoundation.org,
	rafael@kernel.org, dakr@kernel.org, johan@kernel.org,
	sudeep.holla@kernel.org, ritesh.list@gmail.com,
	tim.c.chen@linux.intel.com, yu.c.chen@intel.com
Subject: [PATCH 0/5] cacheinfo, powerpc: Move powerpc to generic cacheinfo
Date: Wed, 18 Nov 2026 22:06:34 +0530	[thread overview]
Message-ID: <20261118163639.890546-1-sshegde@linux.ibm.com> (raw)

This is another attempt to move powerpc towards generic cacheinfo
framework. This is spiritual successor to earlier attempts by Sudeep
Holla [1]

The context around this time was, when trying to enable Cache Aware
scheduling on powerpc using a llc_override kernel parameter[2], it was
pointed out that the llc_bytes which is retreived using
get_effective_llc_bytes fails and hence the cache aware scheduling is
effectively a NOP, moment the process has a visible footprint.

Instead of adding more hacks around with custom arch_llc_bytes, this is
an attempt to move powerpc to generic cacheinfo instead. This removes
the powerpc maintaining a separate sysfs entries for all caches.
A few modifications to the generic code is necessary due to some of the
conventions followed in the device tree specifications. The details are
in the respective patches.

If this approach does not work, then I am afraid we might have to fallback to
arch_llc_bytes.

Note that initial draft of the work[code,changelog] was carried out by LLM.
Provided the device tree blob and both powerpc,generic cacheinfo code.
With few iterations, LLM did generate the right code with few tweaks.
Only the cover-letter and Patch 5 are completely from me. Thanks to
LLM, this series is in shape in few days otherwise would have taken
more time. 

Tested the values compatibilty on Power11 Dedicated and Shared LPAR's.
All the values are same, except id and uevent which was not there
before. That should help rather than hurt any tool.

This may need more broader checks on different boards/configuration
to ensure it is same. Also DLPAR CPU add/remove is not tested yet.
Please test and report if your board/platform shows up any different
values in those cache entries.

[1]: https://lore.kernel.org/all/1424715500-21725-1-git-send-email-sudeep.holla@arm.com/#t
[2]: https://lore.kernel.org/all/20261023131646.2907938-1-sshegde@linux.ibm.com/

This series is needed llc_override patch[2] series to work. A subsequent
version of that will be sent out soon.

PS: I am working with 90% coffee and 10% sleep.

Shrikanth Hegde (5):
  cacheinfo: Allow architectures to provide custom cache IDs
  cacheinfo: Support unified caches described by d-cache properties
  cacheinfo: Add teardown and rebuild helpers
  powerpc/cacheinfo: Move to generic cacheinfo
  sched/topology: Remove stale comment around llc_bytes on powerpc

 arch/powerpc/kernel/cacheinfo.c           | 994 +++-------------------
 arch/powerpc/kernel/cacheinfo.h           |  13 -
 arch/powerpc/kernel/sysfs.c               |   3 -
 arch/powerpc/platforms/pseries/mobility.c |   2 +-
 drivers/base/cacheinfo.c                  | 111 ++-
 include/linux/cacheinfo.h                 |   3 +
 kernel/sched/topology.c                   |   7 -
 7 files changed, 194 insertions(+), 939 deletions(-)
 delete mode 100644 arch/powerpc/kernel/cacheinfo.h

-- 
2.54.0


             reply	other threads:[~2026-11-18 16:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18 16:36 Shrikanth Hegde [this message]
2026-11-18 16:36 ` [PATCH 1/5] cacheinfo: Allow architectures to provide custom cache IDs Shrikanth Hegde
2026-11-18 16:36 ` [PATCH 2/5] cacheinfo: Support unified caches described by d-cache properties Shrikanth Hegde
2026-11-18 16:36 ` [PATCH 3/5] cacheinfo: Add teardown and rebuild helpers Shrikanth Hegde
2026-11-18 16:36 ` [PATCH 4/5] powerpc/cacheinfo: Move to generic cacheinfo Shrikanth Hegde
2026-11-18 16:36 ` [PATCH 5/5] sched/topology: Remove stale comment around llc_bytes on powerpc Shrikanth Hegde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261118163639.890546-1-sshegde@linux.ibm.com \
    --to=sshegde@linux.ibm.com \
    --cc=christophe.leroy@csgroup.eu \
    --cc=dakr@kernel.org \
    --cc=driver-core@lists.linux.dev \
    --cc=gregkh@linuxfoundation.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.ibm.com \
    --cc=rafael@kernel.org \
    --cc=ritesh.list@gmail.com \
    --cc=sudeep.holla@kernel.org \
    --cc=tim.c.chen@linux.intel.com \
    --cc=yu.c.chen@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®