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

Re: [Xen-devel] [PATCH] xen/pvhsim: fix cpu onlining



On 23.10.2019 14:55, Roger Pau Monné wrote:
> On Wed, Oct 23, 2019 at 02:12:09PM +0200, Juergen Gross wrote:
>> Since commit 8d3c326f6756d1 ("xen: let vcpu_create() select processor")
>> the initial processor for all pv-shim vcpus will be 0, as no other cpus
>> are online when the vcpus are created. Before that commit the vcpus
>> would have processors set not being online yet, which worked just by
>> chance.
>>
>> When the pv-shim vcpu becomes active it will have a hard affinity
>> not matching its initial processor assignment leading to failing
>> ASSERT()s or other problems depending on the selected scheduler.
>>
>> Fix that by doing the affinity setting after onlining the cpu but
>> before taking the vcpu up. For vcpu 0 this is still in
>> sched_setup_dom0_vcpus(), for the other vcpus setting the affinity
>> there can be dropped.
>>
>> Fixes: 8d3c326f6756d1 ("xen: let vcpu_create() select processor")
>> Reported-by: Sergey Dyasli <sergey.dyasli@xxxxxxxxxx>
>> Tested-by: Sergey Dyasli <sergey.dyasli@xxxxxxxxxx>
>> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
> 
> Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

I have to admit though that I miss a comment on the pv_shim
conditional in schedule.c - such a special case shouldn't
really be there, but since it's needed it should be explained.
I realize though that the patch here only moves the special
case, i.e. the lack of comment is pre-existing.

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.