On 1/27/26 23:37, [email protected] wrote:
Koralahalli Channabasappa, Smita wrote:
[..]
I’m re reading Dan’s note here:
https://lore.kernel.org/all/[email protected]/

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.



Reply via email to