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

Re: Null scheduler and vwfi native problem



(Adding Andrew, Jan, Juergen for visibility)

Hi Dario,

On 02/02/2021 15:03, Dario Faggioli wrote:
On Tue, 2021-02-02 at 07:59 +0000, Julien Grall wrote:
Hi Dario,

I have had a quick look at your place. The RCU call in
leave_hypervisor_to_guest() needs to be placed just after the last
call
to check_for_pcpu_work().

Otherwise, you may be preempted and keep the RCU quiet.

Ok, makes sense. I'll move it.

The placement in enter_hypervisor_from_guest() doesn't matter too
much,
although I would consider to call it as a late as possible.

Mmmm... Can I ask why? In fact, I would have said "as soon as
possible".

Because those functions only access data for the current vCPU/domain. This is already protected by the fact that the domain is running.

By leaving the "quiesce" mode later, you give an opportunity to the RCU to release memory earlier.

In reality, it is probably still too early as a pCPU can be considered quiesced until a call to rcu_lock*() (such rcu_lock_domain()).

But this would require some investigation to check if we effectively protect all the region with the RCU helpers. This is likely too complicated for 4.15.

Cheers,

--
Julien Grall



 


Rackspace

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