From: Marcelo Tosatti <mtosatti@redhat.com>
To: Gleb Natapov <gleb@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
mingo@redhat.com, glommer@parallels.com, tglx@linutronix.de,
jeremy@goop.org, rostedt@goodmis.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] remove sched notifier for cross-cpu migrations
Date: Thu, 11 Jul 2013 19:15:39 -0300 [thread overview]
Message-ID: <20130711221539.GA10973@amt.cnet> (raw)
In-Reply-To: <20130711081025.GE5895@redhat.com>
On Thu, Jul 11, 2013 at 11:10:25AM +0300, Gleb Natapov wrote:
> On Wed, Jul 10, 2013 at 10:21:57PM -0300, Marcelo Tosatti wrote:
> >
> > Linux as a guest on KVM hypervisor, the only user of the pvclock
> > vsyscall interface, does not require notification on task migration
> > because:
> >
> > 1. cpu ID number maps 1:1 to per-CPU pvclock time info.
> > 2. per-CPU pvclock time info is updated if the
> > underlying CPU changes.
> > 3. that version is increased whenever underlying CPU
> > changes.
> >
> Is this the case with KVM though? IIRC KVM does not updates kvmclock
> on vcpu migration if host has synchronized TSC.
KVM does not update kvmclock on vcpu->pcpu migration if the
master clock scheme is used, which depends on synchronized TSC.
In that case, it is safe to migrate a thread/vcpu to another cpu without
updating kvmclock area (because all vcpus contain the same value as
system timestamp and different tsc_timestamps, but all (tsc_timestamps)
usable as deltas on any given pcpu.
So the 3 items are necessary in the general case of hypervisor
maintaining distinct kvmclock vcpu areas (copy&pasted the comment from
the code comment).
next prev parent reply other threads:[~2013-07-12 19:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-10 10:34 sched: add " Peter Zijlstra
2013-07-10 14:39 ` Ingo Molnar
2013-07-10 14:52 ` Peter Zijlstra
2013-07-11 1:21 ` [PATCH] remove sched " Marcelo Tosatti
2013-07-11 8:10 ` Gleb Natapov
2013-07-11 22:15 ` Marcelo Tosatti [this message]
2013-07-11 9:52 ` Peter Zijlstra
2013-07-14 11:16 ` Gleb Natapov
2013-08-23 10:22 ` Peter Zijlstra
2013-08-23 10:31 ` Gleb Natapov
2013-08-23 10:34 ` Peter Zijlstra
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=20130711221539.GA10973@amt.cnet \
--to=mtosatti@redhat.com \
--cc=gleb@redhat.com \
--cc=glommer@parallels.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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®