lkml.org 
[lkml]   [2022]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v7 1/1] s390x: KVM: guest support for topology function
From


On 2/18/22 16:10, Heiko Carstens wrote:
>>>> +       /* The real CPU backing up the vCPU moved to another socket
>>>> */
>>>> +       if (topology_physical_package_id(vcpu->cpu) !=
>>>> +           topology_physical_package_id(vcpu->arch.prev_cpu))
>>>> +               return true;
>>>
>>> Why is it OK to look just at the physical package ID here? What if the
>>> vcpu for example moves to a different book, which has a core with the
>>> same physical package ID?
>>>
>>
>> You are right, we should look at the drawer and book id too.
>> Something like that I think:
>>
>> if ((topology_physical_package_id(vcpu->cpu) !=
>> topology_physical_package_id(vcpu->arch.prev_cpu)) ||
>> (topology_book_id(vcpu->cpu) !=
>> topology_book_id(vcpu->arch.prev_cpu)) ||
>> (topology_drawer_id(vcpu->cpu) !=
>> topology_drawer_id(vcpu->arch.prev_cpu)))
>> return true;
>
> You only need to check if prev_cpu is present in topology_core_cpumask(cpu).
>

Yes, thanks.

Regards,
Pierre

--
Pierre Morel
IBM Lab Boeblingen

\
 
 \ /
  Last update: 2022-02-18 18:07    [W:0.543 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site