Port-xen archive

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

Re: Xen timecounter issues



>>>>> On Mon, 24 Jun 2024 11:30:14 +0200, Manuel Bouyer <bouyer%antioche.eu.org@localhost> said:

[...]

>> else if ( pv_shim && v->vcpu_id == 0 )
>> {
>> /*
>> * PV-shim: vcpus are pinned 1:1. Initially only 1 cpu is online,
>> * others will be dealt with when onlining them. This avoids pinning
>> * a vcpu to a not yet online cpu here.
>> */
>> sched_set_affinity(unit, cpumask_of(0), cpumask_of(0));

[...]


> But this doens't tell anything about CPU 0 ?

It does - that's the first part of the if clause. So in the UP case,
vcpu0 is pinned to pcpu0 - which is probably why this doesn't show up in
the dom0/UP case.


> Indeed with the default boot options vCPUs are not pinned (we did know that)

AFAICT, vcpu0 is pinned in all cases - and if timecounter code only runs
from vcpu0, then things get interesting - I'd have the following
questions:

- Why does the TSC read on vcpu0 happen on multiple pcpus ? Was the
  original boot time pinning invalidated at some point ?

- Does our interrupt routing code distribute processing to any available
  vCPU ? (I re-wrote it, but that was a decade ago, and I can't remember
  now - will look again if there is no ready answer).

These are all asides to the problem at hand, of course, but the symptom
is interesting nevertheless.

Best
-- 
Math/(~cherry)


Home | Main Index | Thread Index | Old Index