mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@kernel.org>
To: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Josh Triplett <josh@joshtriplett.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	Joel Fernandes <joel@joelfernandes.org>,
	Suleiman Souhlal <suleiman@google.com>,
	rcu@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rcu/tree: consider time a VM was suspended
Date: Fri, 21 May 2021 07:02:27 -0700	[thread overview]
Message-ID: <20210521140227.GW4441@paulmck-ThinkPad-P17-Gen-1> (raw)
In-Reply-To: <YKdWV2lznaxUKBM5@google.com>

On Fri, May 21, 2021 at 03:42:31PM +0900, Sergey Senozhatsky wrote:
> 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.

I had been hoping!  ;-)

							Thanx, Paul

  reply	other threads:[~2021-05-21 14:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-16 10:27 Sergey Senozhatsky
2021-05-17 16:23 ` Paul E. McKenney
2021-05-18  1:41   ` Sergey Senozhatsky
2021-05-18 23:15     ` Paul E. McKenney
2021-05-20  5:50       ` Sergey Senozhatsky
2021-05-20 14:57         ` Paul E. McKenney
2021-05-20 22:34           ` Sergey Senozhatsky
2021-05-21  0:15             ` Paul E. McKenney
2021-05-20  6:18       ` Sergey Senozhatsky
2021-05-20 14:53         ` Paul E. McKenney
2021-05-20 22:24           ` Sergey Senozhatsky
2021-05-21  0:14             ` Paul E. McKenney
2021-05-21  6:42               ` Sergey Senozhatsky
2021-05-21 14:02                 ` Paul E. McKenney [this message]
2021-05-21  6:36 ` Sergey Senozhatsky
2021-05-21 14:01   ` Paul E. McKenney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210521140227.GW4441@paulmck-ThinkPad-P17-Gen-1 \
    --to=paulmck@kernel.org \
    --cc=jiangshanlai@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=senozhatsky@chromium.org \
    --cc=suleiman@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®