Re: [PATCH v4 18/24] x86/resctrl: Make ctrlval arrays the same size

From: James Morse
Date: Thu Jun 17 2021 - 13:03:21 EST


Hi Reinette,

On 15/06/2021 19:09, Reinette Chatre wrote:
> On 6/14/2021 1:09 PM, James Morse wrote:
>> The CODE and DATA resources report a num_closid that is half the
>> actual size supported by the hardware. This behaviour is visible
>> to user-space when CDP is enabled.
>> The CODE and DATA resources have their own ctrlval arrays which are half
>> the size of the underlying hardware because num_closid was already
>> adjusted. One holds the odd configurations values, the other even.
>>
>> Before the CDP resources can be merged, the 'half the closids'
>> behaviour needs to be implemented by schemata_list_create(), but
>> this causes the ctrl_val[] array to be full sized.
>>
>> Remove the logic from the architecture specific rdt_get_cdp_config()
>> setup, and add it to schemata_list_create(). Functions that
>> walk take num_closid directly from struct rdt_hw_resource also
>
> This is unclear to me ... "Functions that walk ..." seems like it is missing to describe
> what they are walking.

Yup, I'm missing at least a word here! Fixed as:
| functions that walk all the configurations, such as domain_setup_ctrlval() and
| reset_all_ctrls() , take the num_closids directly from...


>> have to halve num_closid as only the lower half of each array is
>> in use. domain_setup_ctrlval() and reset_all_ctrls() both copy
>> struct rdt_hw_resource's num_closid to a struct msr_param. Correct
>> the value here. This is temporary as a subsequent patch will merge
>> the all three ctrl_val[] arrays such that when CDP is in use, the
>
> the all three -> all three ?

Yes. Thanks!

(I've never managed to spot things like this in text I wrote)


Thanks,

James