Yibo Zhao <yi...@codeaurora.org> writes:

> On 2019-09-23 19:00, Toke Høiland-Jørgensen wrote:
>
>>> -   if (params->airtime_weight)
>>> -           sta->airtime_weight = params->airtime_weight;
>>> +   if (params->airtime_weight &&
>>> +       params->airtime_weight != sta->airtime_weight) {
>> 
>> This check doesn't work I think? You're not using the array-based
>> sta->airtime_weight[], and there are locking issues by just checking
>> like this; so maybe just keep the if() on params->airtime_weight, and 
>> do
>> the checking inside the loop while holding the lock?
>
> It should be array-based sta->airtime_weight[] and I am missing that 
> part during the porting. But you are right about we should check it 
> inside the loop with the lock.
>
>> 
>> Or could we just turn the weights into atomics to avoid the locking
>> entirely?
>
> Actually, we still need the active txq locking to make sure the txq is 
> on the rbtree. Otherwise, no need to change airtime weight sum.

True. Just moving the check inside the locking will be the right thing
to do, then.

-Toke

Reply via email to