Re: [PATCH v6 05/11] x86/virt/tdx: Handle concurrent callers in tdx_pamt_get/put()
From: Sohil Mehta
Date: Wed Jul 08 2026 - 17:11:37 EST
>> I'd just add a changelog blurb to handwave it away for the moment:
>>
>> The pamt_refcount[]s are atomic_t's. They do not strictly need
>> to be because all access is protected by pamt_lock. The overhead
>> of an atomic_t in this situation is minuscule compared to the
>> global lock. Leave the (unnecessary) atomic_t in place to enable
>> future optimization with minimal churn.
>>
The atomic_t is introduced primarily by this patch (and slightly by the
previous one).
Instead of "Leave the atomic_t in place", would it be more appropriate
to say "Use an (unnecessary) atomic_t to enable future ..."?
>> Does that work for everybody?
>
Yes, this works.
> Works for me, thanks.