kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC v2 0/7] kvm stael time implementation
@ 2010-08-30 16:06 Glauber Costa
  2010-08-30 16:06 ` [RFC v2 1/7] change headers preparing for steal time Glauber Costa
                   ` (2 more replies)
  0 siblings, 3 replies; 39+ messages in thread
From: Glauber Costa @ 2010-08-30 16:06 UTC (permalink / raw)
  To: kvm; +Cc: avi, zamsden, mtosatti, riel, peterz, mingo, jeremy

Hi,

So, this is basically the same as v1, with three major
differences: 
 1) I am posting to lkml for wider audience
 2) patch 2/7 fixes one problem I mentined would happen in
    smp systems, which is, we only update kvmclock when we
    changes pcup
 3) softlockup algorithm is changed. Again, as marcelo pointed
    out, this is open to discussion, and I am not dropping it
    so more people can step in.

I have some other patches under local test for a slightly modified
guest part accounting, and I do somehow support extending
the interface, and changing to nsecs (maybe not 100 %, but...). But
I am posting in this state so we can have lkml people to step
in earlier.

Reminder of the previous cover-letter:

There are two parts of it: the guest and host part.

The proposal for the guest part, is to just change the
common time accounting, and try to identify at that spot,
wether or not we should account any steal time. I considered
this idea less cumbersome that trying to cook a clockevents
implementation ourselves, since I see little value in it.
I am, however, pretty open to suggestions.

For the host<->guest communications, I am using a shared
page, in the same way as pvclock. Because of that, I am just
hijacking pvclock structure anyway. There is a 32-bit field
floating by, that gives us enough room for 8 years of steal
time (we use msec resolution).

The main idea is to timestamp our exit and entry through
sched notifiers, and export the value at pvclock updates.
This obviously have some disadvantages: by doing this we
are giving up futures ideas about only updating
this structure once, and even right now, won't work
on pinned-smp (since we don't update pvclock if we
haven't changed cpus.)

But again, it is just an RFC, and I'd like to feel the
reception of the idea as a whole.

Have a nice review.
Glauber Costa (7):
  change headers preparing for steal time
  always call kvm_write_guest
  measure time out of guest
  change kernel accounting to include steal time
  kvm steal time implementation
  touch softlockup watchdog
  tell guest about steal time feature

 arch/x86/include/asm/kvm_host.h    |    2 +
 arch/x86/include/asm/kvm_para.h    |    1 +
 arch/x86/include/asm/pvclock-abi.h |    4 ++-
 arch/x86/kernel/kvmclock.c         |   40 ++++++++++++++++++++++++++++++++++++
 arch/x86/kvm/x86.c                 |   26 ++++++++++++++++++----
 include/linux/sched.h              |    1 +
 kernel/sched.c                     |   29 ++++++++++++++++++++++++++
 7 files changed, 97 insertions(+), 6 deletions(-)


^ permalink raw reply	[flat|nested] 39+ messages in thread
* [RFC v2 0/7] kvm steal time implementation proposal
@ 2010-08-30 17:06 Glauber Costa
  2010-08-30 17:06 ` [RFC v2 3/7] measure time out of guest Glauber Costa
  0 siblings, 1 reply; 39+ messages in thread
From: Glauber Costa @ 2010-08-30 17:06 UTC (permalink / raw)
  To: kvm; +Cc: avi, zamsden, mtosatti, riel, peterz, mingo, jeremy

Hi,

So, this is basically the same as v1, with three major
differences:
 1) I am posting to lkml for wider audience
 2) patch 2/7 fixes one problem I mentined would happen in
   smp systems, which is, we only update kvmclock when we
   changes pcup
 3) softlockup algorithm is changed. Again, as marcelo pointed
   out, this is open to discussion, and I am not dropping it
   so more people can step in.

I have some other patches under local test for a slightly modified
guest part accounting, and I do somehow support extending
the interface, and changing to nsecs (maybe not 100 %, but...). But
I am posting in this state so we can have lkml people to step
in earlier.

Reminder of the previous cover-letter:

There are two parts of it: the guest and host part.

The proposal for the guest part, is to just change the
common time accounting, and try to identify at that spot,
wether or not we should account any steal time. I considered
this idea less cumbersome that trying to cook a clockevents
implementation ourselves, since I see little value in it.
I am, however, pretty open to suggestions.

For the host<->guest communications, I am using a shared
page, in the same way as pvclock. Because of that, I am just
hijacking pvclock structure anyway. There is a 32-bit field
floating by, that gives us enough room for 8 years of steal
time (we use msec resolution).

The main idea is to timestamp our exit and entry through
sched notifiers, and export the value at pvclock updates.
This obviously have some disadvantages: by doing this we
are giving up futures ideas about only updating
this structure once, and even right now, won't work
on pinned-smp (since we don't update pvclock if we
haven't changed cpus.)

But again, it is just an RFC, and I'd like to feel the
reception of the idea as a whole.

Glauber Costa (7):
  change headers preparing for steal time
  always call kvm_write_guest
  measure time out of guest
  change kernel accounting to include steal time
  kvm steal time implementation
  touch softlockup watchdog
  tell guest about steal time feature

 arch/x86/include/asm/kvm_host.h    |    2 +
 arch/x86/include/asm/kvm_para.h    |    1 +
 arch/x86/include/asm/pvclock-abi.h |    4 ++-
 arch/x86/kernel/kvmclock.c         |   40 ++++++++++++++++++++++++++++++++++++
 arch/x86/kvm/x86.c                 |   26 ++++++++++++++++++----
 include/linux/sched.h              |    1 +
 kernel/sched.c                     |   29 ++++++++++++++++++++++++++
 7 files changed, 97 insertions(+), 6 deletions(-)


^ permalink raw reply	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2010-09-03  7:19 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-30 16:06 [RFC v2 0/7] kvm stael time implementation Glauber Costa
2010-08-30 16:06 ` [RFC v2 1/7] change headers preparing for steal time Glauber Costa
2010-08-30 16:06   ` [RFC 1/8] Implement getnsboottime kernel API Glauber Costa
2010-08-30 16:06     ` [RFC v2 2/7] always call kvm_write_guest Glauber Costa
2010-08-30 16:06       ` [RFC 2/8] change headers preparing for steal time Glauber Costa
2010-08-30 16:06         ` [RFC 3/8] always call kvm_write_guest Glauber Costa
2010-08-30 16:06           ` [RFC v2 3/7] measure time out of guest Glauber Costa
2010-08-30 16:06             ` [RFC v2 4/7] change kernel accounting to include steal time Glauber Costa
2010-08-30 16:06               ` [RFC 4/8] measure time out of guest Glauber Costa
2010-08-30 16:06                 ` [RFC 5/8] change kernel accounting to include steal time Glauber Costa
2010-08-30 16:06                   ` [RFC v2 5/7] kvm steal time implementation Glauber Costa
2010-08-30 16:06                     ` [RFC 6/8] " Glauber Costa
2010-08-30 16:06                       ` [RFC v2 6/7] touch softlockup watchdog Glauber Costa
2010-08-30 16:06                         ` [RFC v2 7/7] tell guest about steal time feature Glauber Costa
2010-08-30 16:06                           ` [RFC 7/8] touch softlockup watchdog Glauber Costa
2010-08-30 16:06                             ` [RFC 8/8] tell guest about steal time feature Glauber Costa
2010-08-30 17:33                         ` [RFC v2 6/7] touch softlockup watchdog Jeremy Fitzhardinge
2010-08-30 18:07                           ` Glauber Costa
2010-08-30 16:46                   ` [RFC 5/8] change kernel accounting to include steal time Peter Zijlstra
2010-08-30 17:26                     ` Glauber Costa
2010-08-30 17:30               ` [RFC v2 4/7] " Jeremy Fitzhardinge
2010-08-30 18:39                 ` Rik van Riel
2010-08-30 19:07                   ` Jeremy Fitzhardinge
2010-08-30 19:14                     ` Peter Zijlstra
2010-08-30 19:17                     ` Rik van Riel
2010-08-30 19:20                       ` Peter Zijlstra
2010-08-30 19:45                         ` Rik van Riel
2010-08-30 22:56                           ` Jeremy Fitzhardinge
2010-08-30 23:03                             ` Rik van Riel
2010-08-31  8:11                               ` Peter Zijlstra
2010-09-02 18:19                                 ` Glauber Costa
2010-09-03  3:24                                   ` Jeremy Fitzhardinge
2010-09-03  7:18                                   ` Peter Zijlstra
2010-09-01 23:56     ` [RFC 1/8] Implement getnsboottime kernel API Zachary Amsden
2010-08-30 16:37 ` [RFC v2 0/7] kvm stael time implementation Peter Zijlstra
2010-08-30 16:45   ` Jeremy Fitzhardinge
2010-08-30 17:21     ` Glauber Costa
2010-08-30 17:20 ` Jeremy Fitzhardinge
2010-08-30 17:06 [RFC v2 0/7] kvm steal time implementation proposal Glauber Costa
2010-08-30 17:06 ` [RFC v2 3/7] measure time out of guest Glauber Costa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).