[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <04e92860-e616-4e74-a349-1397b3a0db81@amd.com>
Date: Wed, 28 Jan 2026 15:39:51 +0000
From: Alejandro Lucero Palau <alucerop@....com>
To: dan.j.williams@...el.com,
"Koralahalli Channabasappa, Smita" <skoralah@....com>,
Jonathan Cameron <jonathan.cameron@...wei.com>,
Smita Koralahalli <Smita.KoralahalliChannabasappa@....com>
Cc: linux-cxl@...r.kernel.org, linux-kernel@...r.kernel.org,
nvdimm@...ts.linux.dev, linux-fsdevel@...r.kernel.org,
linux-pm@...r.kernel.org, Ard Biesheuvel <ardb@...nel.org>,
Alison Schofield <alison.schofield@...el.com>,
Vishal Verma <vishal.l.verma@...el.com>, Ira Weiny <ira.weiny@...el.com>,
Yazen Ghannam <yazen.ghannam@....com>, Dave Jiang <dave.jiang@...el.com>,
Davidlohr Bueso <dave@...olabs.net>, Matthew Wilcox <willy@...radead.org>,
Jan Kara <jack@...e.cz>, "Rafael J . Wysocki" <rafael@...nel.org>,
Len Brown <len.brown@...el.com>, Pavel Machek <pavel@...nel.org>,
Li Ming <ming.li@...omail.com>, Jeff Johnson
<jeff.johnson@....qualcomm.com>, Ying Huang <huang.ying.caritas@...il.com>,
Yao Xingtao <yaoxt.fnst@...itsu.com>, Peter Zijlstra <peterz@...radead.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Nathan Fontenot <nathan.fontenot@....com>,
Terry Bowman <terry.bowman@....com>, Robert Richter <rrichter@....com>,
Benjamin Cheatham <benjamin.cheatham@....com>,
Zhijian Li <lizhijian@...itsu.com>, Borislav Petkov <bp@...en8.de>,
Tomasz Wolski <tomasz.wolski@...itsu.com>
Subject: Re: [PATCH v5 3/7] cxl/region: Skip decoder reset on detach for
autodiscovered regions
On 1/27/26 23:37, dan.j.williams@...el.com wrote:
> Koralahalli Channabasappa, Smita wrote:
> [..]
>> I’m re reading Dan’s note here:
>> https://lore.kernel.org/all/6930dacd6510f_198110020@dwillia2-mobl4.notmuch/
>>
>> Specifically this part:
>> "If the administrator actually wants to destroy and reclaim that
>> physical address space then they need to forcefully de-commit that
>> auto-assembled region via the @commit sysfs attribute. So that means
>> commit_store() needs to clear CXL_REGION_F_AUTO to get the decoder reset
>> to happen."
>>
>> Today the sysfs commit=0 path inside commit_store() resets decoders
>> without the AUTO check whereas the detach path now skips the reset when
>> CXL_REGION_F_AUTO is set.
>>
>> I think the same rationale should apply to the sysfs de-commit path as
>> well? I’m trying to understand the implications of not guarding the
>> reset with AUTO in commit_store().
> Linux tends to give the administrator the ability to know better than the
> kernel. So if the root forcefully decommits the region, root gets to
> keep the pieces.
I have been trying to figure out how to preserve the decoders for Type2
auto discover regions since, I think, this was demanded after v22 sent
upstream. This patch/change is what I was looking for, and although I
did implement it in another way requiring "consensus", this one seems
good enough and already discussed and approved, so all good.
However, I think it would be also interesting to give the Type2 driver
the option of resetting decoders as well, what I have been using for v22
and successfully tested. But this change will preclude that other
possibility, so, what about an option for clearing CXL_REGION_F_AUTO by
Type2 drivers? If you want this only to be done by admin/root, I guess a
module param would do it.
Powered by blists - more mailing lists