lkml.org 
[lkml]   [2024]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 05/26] cxl/core: Simplify cxl_dpa_set_mode()
From


On 4/5/24 12:21 PM, Ira Weiny wrote:
> Dave Jiang wrote:
>>
>>
>> On 3/24/24 4:18 PM, Ira Weiny wrote:
>>> cxl_dpa_set_mode() checks the mode for validity two times, once outside
>>> of the DPA RW semaphore and again within. The function is not in a
>>> critical path. Prior to Dynamic Capacity the extra check was not much
>>> of an issue. The addition of DC modes increases the complexity of
>>> the check.
>>>
>>> Simplify the mode check before adding the more complex DC modes.
>>
>> I would augment this by saying simplify "by using scope-based resource menagement".
>
> However, using the guard cleanup is not really the simplification here. It is
> more about checking the mode a single time.
>
> That said I will change this to:
>
> Simplify the mode check and convert to use of a cleanup guard.

Ok

>
> Ira

\
 
 \ /
  Last update: 2024-05-27 16:27    [W:0.095 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site