Re: [PATCH] x86/resctrl: fix min_cbm_bits for AMD

From: Reinette Chatre
Date: Mon May 16 2022 - 17:08:55 EST


Hi Stephane,

On 5/16/2022 12:07 PM, Stephane Eranian wrote:
> On Mon, May 16, 2022 at 9:35 AM Reinette Chatre
> <reinette.chatre@xxxxxxxxx> wrote:

...

>> Thank you very much for catching this. While the fix is onto something
>> I would prefer the fix to be obvious and not a side effect of bit
>> checking in an empty bitmap.
>>
> Are you asking for me to add a comment on the modified line or are you asking
> for a change in cbm_validate()? There, I could add an empty_bitmask check to
> that if.

Please check my original response for inline comments to your patch.

I am asking for a change in cbm_validate() and my response did include some
sample code copied below.

>> Something like this before the bit parsing starts:
>> if (r->cache.arch_has_empty_bitmaps && val == 0)
>> goto done;
>>
>> /* Skip bit parsing */
>>
>> done:
>> *data = val;
>> return true;
>>

Reinette