lkml.org 
[lkml]   [2021]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] rcu/tree: consider time a VM was suspended
On (21/05/20 17:14), Paul E. McKenney wrote:
> > On a side note.
> >
> > I wish we didn't have to put kvm_check_and_clear_guest_paused() all
> > over the place.
> >
> > We do load jiffies at the start of check_cpu_stall(). So, in theory,
> > we can just use that captured jiffies (which can become obsolete but
> > so will grace period timestamps) value and never read current system
> > jiffies because they can jump way forward. IOW
> >
> > jn = j + 3 * rcu_jiffies_till_stall_check() + 3;
> >
> > instead of
> >
> > jn = jiffies + 3 * rcu_jiffies_till_stall_check() + 3;
> >
> > Then we probably can remove kvm_check_and_clear_guest_paused().
> >
> > But that "don't load current jiffies" is rather fragile.
> >
> > kvm_check_and_clear_guest_paused() is not pretty, but at least it's
> > explicit.
>
> If this works for you, I am very much in favor!

Oh, no. Sorry for the noise. This is racy and won't work.

\
 
 \ /
  Last update: 2021-05-21 08:45    [W:0.053 / U:1.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site