Re: [PATCH 28/33] arm_mpam: Track bandwidth counter state for overflow and power management

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Fenghua,

On 28/08/2025 01:58, Fenghua Yu wrote:
> On 8/22/25 08:30, James Morse wrote:
>> Bandwidth counters need to run continuously to correctly reflect the
>> bandwidth.
>>
>> The value read may be lower than the previous value read in the case
>> of overflow and when the hardware is reset due to CPU hotplug.
>>
>> Add struct mbwu_state to track the bandwidth counter to allow overflow
>> and power management to be handled.

>> @@ -2291,11 +2395,35 @@ static void mpam_unregister_irqs(void)
>>     static void __destroy_component_cfg(struct mpam_component *comp)
>>   {
>> +    struct mpam_msc *msc;
>> +    struct mpam_vmsc *vmsc;
>> +    struct mpam_msc_ris *ris;
>> +
>> +    lockdep_assert_held(&mpam_list_lock);
>> +
>>       add_to_garbage(comp->cfg);
>> +    list_for_each_entry(vmsc, &comp->vmsc, comp_list) {
>> +        msc = vmsc->msc;
>> +
>> +        mpam_mon_sel_outer_lock(msc);
>> +        if (mpam_mon_sel_inner_lock(msc)) {
>> +            list_for_each_entry(ris, &vmsc->ris, vmsc_list)
>> +                add_to_garbage(ris->mbwu_state);
>> +            mpam_mon_sel_inner_unlock(msc);
>> +        }
>> +        mpam_mon_sel_outer_lock(msc);
> 
> s/mpam_mon_sel_outer_lock(msc);/mpam_mon_sel_outer_unlock(msc);/
> 
> Or this will hit a dead lock.

Heh, that's a good typo. Thanks!

James




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux