Eric.Saxe wrote:

> Hi Aubrey,
>
> Li, Aubrey wrote:
>>
>> Currently we have two kinds of cmt policy across the hierarchical
>> processor group. So it's possible a thread want to be dispatched by
>> the performance policy but there is only power related processor
>> group avaiable.
>>
>> The following patch adds a member into kthread_t structure, and use
>> the same event driver which is used to notify cpupm to change
>> p-state, to make the next kernel thread sensitive to the cmt policy,
>> so that in later cmt balance, we can choose cpu by searching the
>> related target processor group, unrelated groups will be ignored.
>>
>> What do you think?
>
> It makes sense to me to consider only certain levels of the PG
> hierarchy for load balancing and coalescence depending on things like
> resource utilization, policy preferences, etc. I wasn't thinking that
> this would be implemented on a per thread basis however.


> At least for
> now, I was thinking this would be implemented on a per CPU basis, by
> modifying the lineage in the CPU's PG data when the policy is changed
> (for example, removing the power domain from from the lineage for
> performance mode (or
> at least demoting it below the load balancing one)). That way, we
> don't have have to add the extra conditional logic in
> cmt_policy.c...which is somewhat performance critical.

This is also what I was thinking. But when the event driver set the policy to
a per CPU basis, this property may not be bringed into cmt_balance(),
because cpu_choose() will choose cpu again. The cpu will be different.
So I think a per thead basis is better than a per CPU basis.

Thanks,
-Aubrey

Reply via email to