mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ben Horgan <ben.horgan@arm.com>
To: Jonathan Cameron <jonathan.cameron@huawei.com>,
	Linus Walleij <linusw@kernel.org>
Cc: Yushan Wang <wangyushan12@huawei.com>,
	alexandre.belloni@bootlin.com, arnd@arndb.de, fustini@kernel.org,
	krzk@kernel.org, linus.walleij@linaro.org, will@kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, fanghao11@huawei.com,
	linuxarm@huawei.com, liuyonglong@huawei.com,
	prime.zeng@hisilicon.com, wangzhou1@hisilicon.com,
	xuwei5@hisilicon.com, linux-mm@vger.kernel.org,
	SeongJae Park <sj@kernel.org>,
	reinette.chatre@intel.com, james.morse@arm.com,
	Zeng Heng <zengheng4@huawei.com>, Tony Luck <tony.luck@intel.com>,
	Dave Martin <Dave.Martin@arm.com>,
	Babu Moger <babu.moger@amd.com>
Subject: Re: [PATCH 1/3] soc cache: L3 cache driver for HiSilicon SoC
Date: Thu, 5 Feb 2026 14:37:03 +0000	[thread overview]
Message-ID: <3d14457d-a510-45b0-811f-347aac5cfda8@arm.com> (raw)
In-Reply-To: <20260205101814.000072ec@huawei.com>

On 2/5/26 10:18, Jonathan Cameron wrote:
> On Thu, 5 Feb 2026 10:12:33 +0100
> Linus Walleij <linusw@kernel.org> wrote:
> 
>> Hi Jonathan,
>>
>> thanks for stepping in, I'm trying to be healthy sceptical here...
>>
>> What you and others need to do is to tell me if I'm being too
>> critical. But right now it feels like I need some more senior
>> MM developers to tell me to be a good boy and let this
>> hack patch slip before I shut up ;)
> 
> It's good to have these discussions as it makes us actually
> explain what they want to do much more clearly!
> wangyushan and I have both been taking about this for too long so
> it's easy to miss that it's not been explained properly.
> 
> Note I was absolutely expecting a non trivial discussion on how to do
> this and in particular how generic it should be.
>  
> +CC a various resctl / mpam related people.
[...]
> 
>>
>> But does the developer know if that hard kernel is importantest
>> taken into account all other processes running on the system,
>> and what happens if several processes say they have
>> such hard kernels? Who will arbitrate? That is usually the
>> kernels job.
> 
> Take the closest example to this which is resctl (mpam on arm).
> This actually has a feature that smells a bit like this.
> Pseudo-cache locking. 
> 
> https://docs.kernel.org/filesystems/resctrl.html#cache-pseudo-locking
> 
> My understanding is that the semantics of that don't align perfectly
> with what we have here.  Yushan can you add more on why we didn't
> try to fit into that scheme?  Other than the obvious bit that more
> general upstream support for the arch definitions of MPAM is a work in
> progress and fitting vendor specific features on top will be tricky
> for a while at least.  The hardware here is also independent of the
> MPAM support.
> 
> Resctl puts the control on resource allocation into the hands of
> userspace (in that case via cgroups etc as it's process level controls).
> The cache lockdown is a weird because you have go through a dance of
> creating a temporary setup, demand fetching the lines into cache and
> then rely on various operations not occuring that might push them out
> again.
> 
> Resctl provides many footguns and is (I believe) used by administrators
> who are very careful in how they use it.  Note that there are some guards
> in this new code to only allow locking a portion of the l3. We also rely
> somewhat on the uarch and cache design to ensure it is safe to do this
> type of locking (other than reducing perf of other tasks).
> I'm dancing around uarch details here that I would need to go seek
> agreement to share more on.
> 

Just wondering about the compatiblity of cache lockdown and
resctrl/mpam. If this is done outside resctrl then how would this
interact with the cache portion bitmaps used in resctrl/mpam? For
instance, how would a user know whether or not a resctrl/mpam cache
portion is unusable because it has been locked?
Thanks,

Ben


  parent reply	other threads:[~2026-02-05 14:37 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-03 16:18 [PATCH 0/3] soc: Enable cache lockdown for HiSilicon L3 cache Yushan Wang
2026-02-03 16:18 ` [PATCH 1/3] soc cache: L3 cache driver for HiSilicon SoC Yushan Wang
2026-02-03 17:19   ` Arnd Bergmann
2026-02-04  9:51     ` wangyushan
2026-02-05  9:37     ` Krzysztof Kozlowski
2026-02-05 11:19       ` wangyushan
2026-02-05 11:23         ` Krzysztof Kozlowski
2026-02-05 11:30           ` wangyushan
2026-02-04  0:10   ` Linus Walleij
2026-02-04  9:53     ` wangyushan
2026-02-04 10:06       ` Linus Walleij
2026-02-04 13:40     ` Jonathan Cameron
2026-02-04 13:44       ` Jonathan Cameron
2026-02-05  2:20         ` SeongJae Park
2026-02-05  9:12       ` Linus Walleij
2026-02-05 10:18         ` Jonathan Cameron
2026-02-05 13:47           ` Linus Walleij
2026-02-05 14:38             ` Arnd Bergmann
2026-02-06  8:05               ` Linus Walleij
2026-02-05 14:37           ` Ben Horgan [this message]
2026-02-06  9:54           ` wangyushan
2026-02-06 16:15             ` Ben Horgan
2026-02-06 10:07       ` wangyushan
2026-02-06 10:44         ` Arnd Bergmann
2026-02-06 12:44         ` Linus Walleij
2026-02-04  2:47   ` kernel test robot
2026-02-03 16:18 ` [PATCH 2/3] soc cache: L3 cache lockdown support " Yushan Wang
2026-02-03 16:18 ` [PATCH 3/3] Documentation: soc cache: Add documentation to HiSilicon SoC cache Yushan Wang

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=3d14457d-a510-45b0-811f-347aac5cfda8@arm.com \
    --to=ben.horgan@arm.com \
    --cc=Dave.Martin@arm.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=arnd@arndb.de \
    --cc=babu.moger@amd.com \
    --cc=fanghao11@huawei.com \
    --cc=fustini@kernel.org \
    --cc=james.morse@arm.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=krzk@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linusw@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=liuyonglong@huawei.com \
    --cc=prime.zeng@hisilicon.com \
    --cc=reinette.chatre@intel.com \
    --cc=sj@kernel.org \
    --cc=tony.luck@intel.com \
    --cc=wangyushan12@huawei.com \
    --cc=wangzhou1@hisilicon.com \
    --cc=will@kernel.org \
    --cc=xuwei5@hisilicon.com \
    --cc=zengheng4@huawei.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®