Re: [PATCH 0/4] Alter steal-time reporting in the guest

2013-03-06 Thread Glauber Costa
On 03/06/2013 05:41 AM, Marcelo Tosatti wrote: On Tue, Mar 05, 2013 at 02:22:08PM -0600, Michael Wolf wrote: Sorry for the delay in the response. I did not see the email right away. On Mon, 2013-02-18 at 22:11 -0300, Marcelo Tosatti wrote: On Mon, Feb 18, 2013 at 05:43:47PM +0100, Frederic

Re: [PATCH 4/4] Add a timer to allow the separation of consigned from steal time.

2013-02-07 Thread Glauber Costa
On 02/06/2013 10:07 PM, Michael Wolf wrote: On 02/06/2013 08:36 AM, Glauber Costa wrote: On 02/06/2013 01:49 AM, Michael Wolf wrote: Add a helper routine to scheduler/core.c to allow the kvm module to retrieve the cpu hardlimit settings. The values will be used to set up a timer that is used

Re: [PATCH 4/4] Add a timer to allow the separation of consigned from steal time.

2013-02-06 Thread Glauber Costa
On 02/06/2013 01:49 AM, Michael Wolf wrote: Add a helper routine to scheduler/core.c to allow the kvm module to retrieve the cpu hardlimit settings. The values will be used to set up a timer that is used to separate the consigned from the steal time. Sorry: What is the business of a timer in

Re: [PATCH 0/5] Alter steal time reporting in KVM

2012-12-05 Thread Glauber Costa
I am deeply sorry. I was busy first time I read this, so I postponed answering and ended up forgetting. Sorry include/linux/sched.h: unsigned long long run_delay; /* time spent waiting on a runqueue */ So if you are out of the runqueue, you won't get steal time accounted, and then I truly

Re: [RFC PATCH 0/2] mm: Add ability to monitor task's memory changes

2012-12-03 Thread Glauber Costa
On 11/30/2012 09:55 PM, Pavel Emelyanov wrote: Hello, This is an attempt to implement support for memory snapshot for the the checkpoint-restore project (http://criu.org). To create a dump of an application(s) we save all the information about it to files. No surprise, the biggest part of

Re: [RFC PATCH 0/2] mm: Add ability to monitor task's memory changes

2012-12-03 Thread Glauber Costa
On 12/04/2012 12:16 AM, Marcelo Tosatti wrote: On Mon, Dec 03, 2012 at 12:36:33PM +0400, Glauber Costa wrote: On 11/30/2012 09:55 PM, Pavel Emelyanov wrote: Hello, This is an attempt to implement support for memory snapshot for the the checkpoint-restore project (http://criu.org

Re: [PATCH 0/5] Alter steal time reporting in KVM

2012-11-28 Thread Glauber Costa
On 11/27/2012 07:10 PM, Michael Wolf wrote: On 11/27/2012 02:48 AM, Glauber Costa wrote: Hi, On 11/27/2012 12:36 AM, Michael Wolf wrote: In the case of where you have a system that is running in a capped or overcommitted environment the user may see steal time being reported in accounting

Re: [PATCH 0/5] Alter steal time reporting in KVM

2012-11-28 Thread Glauber Costa
On 11/28/2012 10:43 PM, Michael Wolf wrote: On 11/27/2012 05:24 PM, Marcelo Tosatti wrote: On Mon, Nov 26, 2012 at 02:36:24PM -0600, Michael Wolf wrote: In the case of where you have a system that is running in a capped or overcommitted environment the user may see steal time being reported

Re: [PATCH 0/5] Alter steal time reporting in KVM

2012-11-27 Thread Glauber Costa
Hi, On 11/27/2012 12:36 AM, Michael Wolf wrote: In the case of where you have a system that is running in a capped or overcommitted environment the user may see steal time being reported in accounting tools such as top or vmstat. This can cause confusion for the end user. To ease the

Re: [patch 18/18] KVM: x86: update pvclock area conditionally, on cpu migration

2012-11-20 Thread Glauber Costa
the others untouched, it looks correct. Acked-by: Glauber Costa glom...@parallels.com -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [patch 00/18] pvclock vsyscall support + KVM hypervisor support (v5)

2012-11-20 Thread Glauber Costa
On 11/20/2012 01:57 AM, Marcelo Tosatti wrote: This patchset, based on earlier work by Jeremy Fitzhardinge, implements paravirtual clock vsyscall support. It should be possible to implement Xen support relatively easily. It reduces clock_gettime from 500 cycles to 200 cycles on my

Re: [patch 02/18] x86: kvmclock: allocate pvclock shared memory area

2012-11-15 Thread Glauber Costa
. There is no such guarantee with per cpu areas, therefore move to memblock_alloc based allocation. Ok. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com For the concept: Acked-by: Glauber Costa glom...@parallels.com I do have one comment. Index: vsyscall/arch/x86/kernel/kvmclock.c

Re: [patch 05/18] x86: pvclock: create helper for pvclock data retrieval

2012-11-15 Thread Glauber Costa
On 11/15/2012 04:08 AM, Marcelo Tosatti wrote: Originally from Jeremy Fitzhardinge. So code can be reused. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com I thought I had acked this one already? But maybe I didn't... Acked-by: Glauber Costa glom...@parallels.com -- To unsubscribe

Re: [patch 06/18] x86: pvclock: introduce helper to read flags

2012-11-15 Thread Glauber Costa
On 11/15/2012 04:08 AM, Marcelo Tosatti wrote: Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Index: vsyscall/arch/x86/kernel/pvclock.c === --- vsyscall.orig/arch/x86/kernel/pvclock.c Acked-by: Glauber Costa glom

Re: [patch 07/18] x86: pvclock: add note about rdtsc barriers

2012-11-15 Thread Glauber Costa
On 11/15/2012 04:08 AM, Marcelo Tosatti wrote: As noted by Gleb, not advertising SSE2 support implies no RDTSC barriers. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com And this gets a separate patch because? Index: vsyscall/arch/x86/include/asm/pvclock.h

Re: [patch 18/18] KVM: x86: update pvclock area conditionally, on cpu migration

2012-11-15 Thread Glauber Costa
tricky... Assuming you tested this change in at least one stable tsc and one unstable tsc system: Acked-by: Glauber Costa glom...@parallels.com -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http

Re: [patch 02/18] x86: kvmclock: allocate pvclock shared memory area (v2)

2012-11-15 Thread Glauber Costa
. There is no such guarantee with per cpu areas, therefore move to memblock_alloc based allocation. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com No further objections. Acked-by: Glauber Costa glom...@parallels.com -- To unsubscribe from this list: send the line unsubscribe kvm in the body

Re: [patch 08/16] KVM: x86: introduce facility to support vsyscall pvclock, via MSR

2012-11-05 Thread Glauber Costa
On 11/02/2012 05:00 PM, Marcelo Tosatti wrote: On Fri, Nov 02, 2012 at 02:23:06PM +0400, Glauber Costa wrote: On 11/02/2012 01:39 AM, Marcelo Tosatti wrote: On Thu, Nov 01, 2012 at 06:28:31PM +0400, Glauber Costa wrote: On 11/01/2012 02:47 AM, Marcelo Tosatti wrote: Allow a guest to register

Re: [patch 09/16] x86: kvm guest: pvclock vsyscall support

2012-11-02 Thread Glauber Costa
On 11/01/2012 02:47 AM, Marcelo Tosatti wrote: + info = pvclock_get_vsyscall_time_info(cpu); + + low = (int)__pa(info) | 1; + high = ((u64)__pa(per_cpu(hv_clock, cpu)) 32); + ret = native_write_msr_safe(MSR_KVM_USERSPACE_TIME, low, high); + printk(KERN_INFO kvm-clock:

Re: [patch 09/18] KVM: x86: introduce facility to support vsyscall pvclock, via MSR

2012-11-02 Thread Glauber Costa
On 10/31/2012 07:12 AM, Marcelo Tosatti wrote: On Tue, Oct 30, 2012 at 11:39:32AM +0200, Avi Kivity wrote: On 10/29/2012 08:40 PM, Marcelo Tosatti wrote: On Mon, Oct 29, 2012 at 10:44:41AM -0700, Jeremy Fitzhardinge wrote: On 10/29/2012 07:45 AM, Glauber Costa wrote: On 10/24/2012 05:13 PM

Re: [patch 08/16] KVM: x86: introduce facility to support vsyscall pvclock, via MSR

2012-11-02 Thread Glauber Costa
On 11/02/2012 01:39 AM, Marcelo Tosatti wrote: On Thu, Nov 01, 2012 at 06:28:31PM +0400, Glauber Costa wrote: On 11/01/2012 02:47 AM, Marcelo Tosatti wrote: Allow a guest to register a second location for the VCPU time info structure for each vcpu (as described by MSR_KVM_SYSTEM_TIME_NEW

Re: [patch 10/16] x86: vdso: pvclock gettime support

2012-11-02 Thread Glauber Costa
On 11/02/2012 04:33 AM, Marcelo Tosatti wrote: On Thu, Nov 01, 2012 at 07:42:43PM -0200, Marcelo Tosatti wrote: On Thu, Nov 01, 2012 at 06:41:46PM +0400, Glauber Costa wrote: On 11/01/2012 02:47 AM, Marcelo Tosatti wrote: +#ifdef CONFIG_PARAVIRT_CLOCK + +static notrace const struct

Re: [patch 01/16] KVM: x86: retain pvclock guest stopped bit in guest memory

2012-11-01 Thread Glauber Costa
=== Reviewed-by: Glauber Costa glom...@parallels.com -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [patch 02/16] x86: pvclock: make sure rdtsc doesnt speculate out of region

2012-11-01 Thread Glauber Costa
On 11/01/2012 03:48 PM, Gleb Natapov wrote: On Wed, Oct 31, 2012 at 08:46:58PM -0200, Marcelo Tosatti wrote: Originally from Jeremy Fitzhardinge. pvclock_get_time_values, which contains the memory barriers will be removed by next patch. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com

Re: [patch 03/16] x86: pvclock: remove pvclock_shadow_time

2012-11-01 Thread Glauber Costa
On 11/01/2012 02:46 AM, Marcelo Tosatti wrote: Originally from Jeremy Fitzhardinge. We can copy the information directly from struct pvclock_vcpu_time_info, remove pvclock_shadow_time. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Reviewed-by: Glauber Costa glom...@parallels.com

Re: [patch 04/16] x86: pvclock: create helper for pvclock data retrieval

2012-11-01 Thread Glauber Costa
On 11/01/2012 02:47 AM, Marcelo Tosatti wrote: +static __always_inline +unsigned __pvclock_read_cycles(const struct pvclock_vcpu_time_info *src, +cycle_t *cycles, u8 *flags) +{ + unsigned version; + cycle_t ret, offset; + u8 ret_flags; + +

Re: [patch 05/16] x86: pvclock: introduce helper to read flags

2012-11-01 Thread Glauber Costa
On 11/01/2012 02:47 AM, Marcelo Tosatti wrote: Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Index: vsyscall/arch/x86/kernel/pvclock.c If you are resending this series, I don't see a reason for this one to be in a separate patch. code itself is fine. -- To unsubscribe from this list:

Re: [patch 06/16] sched: add notifier for cross-cpu migrations

2012-11-01 Thread Glauber Costa
On 11/01/2012 02:47 AM, Marcelo Tosatti wrote: Originally from Jeremy Fitzhardinge. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Please collect peterz's ack for this one. Index: vsyscall/include/linux/sched.h === ---

Re: [patch 07/16] x86: pvclock: generic pvclock vsyscall initialization

2012-11-01 Thread Glauber Costa
On 11/01/2012 02:47 AM, Marcelo Tosatti wrote: Originally from Jeremy Fitzhardinge. Introduce generic, non hypervisor specific, pvclock initialization routines. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Index: vsyscall/arch/x86/kernel/pvclock.c

Re: [patch 08/16] KVM: x86: introduce facility to support vsyscall pvclock, via MSR

2012-11-01 Thread Glauber Costa
On 11/01/2012 02:47 AM, Marcelo Tosatti wrote: Allow a guest to register a second location for the VCPU time info structure for each vcpu (as described by MSR_KVM_SYSTEM_TIME_NEW). This is intended to allow the guest kernel to map this information into a usermode accessible page, so that

Re: [patch 10/16] x86: vdso: pvclock gettime support

2012-11-01 Thread Glauber Costa
On 11/01/2012 02:47 AM, Marcelo Tosatti wrote: +#ifdef CONFIG_PARAVIRT_CLOCK + +static notrace const struct pvclock_vsyscall_time_info *get_pvti(int cpu) +{ + const aligned_pvti_t *pvti_base; + int idx = cpu / (PAGE_SIZE/PVTI_SIZE); + int offset = cpu % (PAGE_SIZE/PVTI_SIZE); +

Re: [patch 09/18] KVM: x86: introduce facility to support vsyscall pvclock, via MSR

2012-10-30 Thread Glauber Costa
On 10/29/2012 09:44 PM, Jeremy Fitzhardinge wrote: On 10/29/2012 07:45 AM, Glauber Costa wrote: On 10/24/2012 05:13 PM, Marcelo Tosatti wrote: Allow a guest to register a second location for the VCPU time info structure for each vcpu (as described by MSR_KVM_SYSTEM_TIME_NEW

Re: [patch 09/18] KVM: x86: introduce facility to support vsyscall pvclock, via MSR

2012-10-30 Thread Glauber Costa
On 10/29/2012 10:40 PM, Marcelo Tosatti wrote: On Mon, Oct 29, 2012 at 10:44:41AM -0700, Jeremy Fitzhardinge wrote: On 10/29/2012 07:45 AM, Glauber Costa wrote: On 10/24/2012 05:13 PM, Marcelo Tosatti wrote: Allow a guest to register a second location for the VCPU time info structure

Re: [patch 11/18] x86: vsyscall: pass mode to gettime backend

2012-10-30 Thread Glauber Costa
On 10/29/2012 10:41 PM, Marcelo Tosatti wrote: On Mon, Oct 29, 2012 at 06:47:57PM +0400, Glauber Costa wrote: On 10/24/2012 05:13 PM, Marcelo Tosatti wrote: Required by next patch. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com I don't see where. + if (unlikely(!(flags

Re: [patch 12/18] x86: vdso: pvclock gettime support

2012-10-30 Thread Glauber Costa
On 10/29/2012 10:42 PM, Marcelo Tosatti wrote: On Mon, Oct 29, 2012 at 06:59:35PM +0400, Glauber Costa wrote: On 10/24/2012 05:13 PM, Marcelo Tosatti wrote: Improve performance of time system calls when using Linux pvclock, by reading time info from fixmap visible copy of pvclock data

Re: [patch 13/18] KVM: x86: pass host_tsc to read_l1_tsc

2012-10-30 Thread Glauber Costa
On 10/29/2012 10:45 PM, Marcelo Tosatti wrote: On Mon, Oct 29, 2012 at 07:04:59PM +0400, Glauber Costa wrote: On 10/24/2012 05:13 PM, Marcelo Tosatti wrote: Allow the caller to pass host tsc value to kvm_x86_ops-read_l1_tsc(). Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Would you

Re: [patch 15/18] KVM: x86: implement PVCLOCK_TSC_STABLE_BIT pvclock flag

2012-10-30 Thread Glauber Costa
On 10/24/2012 05:13 PM, Marcelo Tosatti wrote: KVM added a global variable to guarantee monotonicity in the guest. One of the reasons for that is that the time between 1. ktime_get_ts(timespec); 2. rdtscll(tsc); Is variable. That is, given a host with stable TSC, suppose that

Re: [patch 08/18] x86: pvclock: generic pvclock vsyscall initialization

2012-10-29 Thread Glauber Costa
On 10/24/2012 05:13 PM, Marcelo Tosatti wrote: Index: vsyscall/arch/x86/Kconfig === --- vsyscall.orig/arch/x86/Kconfig +++ vsyscall/arch/x86/Kconfig @@ -632,6 +632,13 @@ config PARAVIRT_SPINLOCKS config PARAVIRT_CLOCK

Re: [patch 08/18] x86: pvclock: generic pvclock vsyscall initialization

2012-10-29 Thread Glauber Costa
On 10/24/2012 05:13 PM, Marcelo Tosatti wrote: + */ +int __init pvclock_init_vsyscall(void) +{ + int idx; + unsigned int size = PVCLOCK_VSYSCALL_NR_PAGES*PAGE_SIZE; + + pvclock_vdso_info = __alloc_bootmem(size, PAGE_SIZE, 0); + if (!pvclock_vdso_info) + return

Re: [patch 09/18] KVM: x86: introduce facility to support vsyscall pvclock, via MSR

2012-10-29 Thread Glauber Costa
On 10/24/2012 05:13 PM, Marcelo Tosatti wrote: Allow a guest to register a second location for the VCPU time info structure for each vcpu (as described by MSR_KVM_SYSTEM_TIME_NEW). This is intended to allow the guest kernel to map this information into a usermode accessible page, so that

Re: [patch 11/18] x86: vsyscall: pass mode to gettime backend

2012-10-29 Thread Glauber Costa
On 10/24/2012 05:13 PM, Marcelo Tosatti wrote: Required by next patch. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com I don't see where. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [patch 12/18] x86: vdso: pvclock gettime support

2012-10-29 Thread Glauber Costa
On 10/24/2012 05:13 PM, Marcelo Tosatti wrote: Improve performance of time system calls when using Linux pvclock, by reading time info from fixmap visible copy of pvclock data. Originally from Jeremy Fitzhardinge. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Index:

Re: [patch 13/18] KVM: x86: pass host_tsc to read_l1_tsc

2012-10-29 Thread Glauber Costa
On 10/24/2012 05:13 PM, Marcelo Tosatti wrote: Allow the caller to pass host tsc value to kvm_x86_ops-read_l1_tsc(). Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Would you mind explaining why? it seems to me that rdtscll() here would be perfectly safe: the only case in which they

Re: [PATCH RFC V2 0/5] Separate consigned (expected steal) from steal time.

2012-10-17 Thread Glauber Costa
On 10/17/2012 06:23 AM, Michael Wolf wrote: In the case of where you have a system that is running in a capped or overcommitted environment the user may see steal time being reported in accounting tools such as top or vmstat. This can cause confusion for the end user. To ease the confusion

Re: [PATCH RFC 0/3] Add guest cpu_entitlement reporting

2012-08-27 Thread Glauber Costa
On 08/27/2012 08:50 AM, Michael Wolf wrote: On Sat, 2012-08-25 at 19:36 -0400, Glauber Costa wrote: On 08/24/2012 11:11 AM, Michael Wolf wrote: On Fri, 2012-08-24 at 08:53 +0400, Glauber Costa wrote: On 08/24/2012 03:14 AM, Michael Wolf wrote: This is an RFC regarding the reporting

Re: [PATCH RFC 0/3] Add guest cpu_entitlement reporting

2012-08-27 Thread Glauber Costa
On 08/27/2012 01:19 PM, Michael Wolf wrote: On Mon, 2012-08-27 at 11:50 -0700, Glauber Costa wrote: On 08/27/2012 08:50 AM, Michael Wolf wrote: On Sat, 2012-08-25 at 19:36 -0400, Glauber Costa wrote: On 08/24/2012 11:11 AM, Michael Wolf wrote: On Fri, 2012-08-24 at 08:53 +0400, Glauber Costa

Re: [PATCH RFC 0/3] Add guest cpu_entitlement reporting

2012-08-27 Thread Glauber Costa
On 08/27/2012 02:27 PM, Michael Wolf wrote: On Mon, 2012-08-27 at 13:31 -0700, Avi Kivity wrote: On 08/27/2012 01:23 PM, Michael Wolf wrote: How would a guest know what its entitlement is? Currently the Admin/management tool setting up the guests will put it on the qemu commandline. From

Re: [PATCH RFC 0/3] Add guest cpu_entitlement reporting

2012-08-25 Thread Glauber Costa
On 08/24/2012 11:11 AM, Michael Wolf wrote: On Fri, 2012-08-24 at 08:53 +0400, Glauber Costa wrote: On 08/24/2012 03:14 AM, Michael Wolf wrote: This is an RFC regarding the reporting of stealtime. In the case of where you have a system that is running with partial processors such as KVM

Re: [PATCH RFC 0/3] Add guest cpu_entitlement reporting

2012-08-23 Thread Glauber Costa
On 08/24/2012 03:14 AM, Michael Wolf wrote: This is an RFC regarding the reporting of stealtime. In the case of where you have a system that is running with partial processors such as KVM the user may see steal time being reported in accounting tools such as top or vmstat. This can cause

Re: [PATCH v5 4/9] KVM-HV: KVM Steal time implementation

2011-07-11 Thread Glauber Costa
On 07/11/2011 10:11 AM, Avi Kivity wrote: On 07/11/2011 04:10 PM, Avi Kivity wrote: I think Peter acked this, yes? Please include his acks. Sorry, I meant this for the kernel/sched.c bits. Yes he did, after I posted the patches. I will include his acks in the respin, since they won't

Re: [PATCH v5 6/9] add jump labels for ia64 paravirt

2011-07-11 Thread Glauber Costa
On 07/11/2011 10:09 AM, Avi Kivity wrote: On 07/04/2011 06:32 PM, Glauber Costa wrote: Since in a later patch I intend to call jump labels inside CONFIG_PARAVIRT, IA64 would fail to compile if they are not provided. This patch provides those jump labels for the IA64 architecture. Please get

Re: [PATCH v5 4/9] KVM-HV: KVM Steal time implementation

2011-07-11 Thread Glauber Costa
On 07/11/2011 09:58 AM, Avi Kivity wrote: On 07/07/2011 08:07 PM, Glauber Costa wrote: +static void record_steal_time(struct kvm_vcpu *vcpu) +{ + u64 delta; + + if (!(vcpu-arch.st.msr_val KVM_MSR_ENABLED)) + return; + + if (unlikely(kvm_read_guest_cached(vcpu-kvm,vcpu-arch.st.stime, + vcpu

[PATCH v6 2/9] KVM-HDR Add constant to represent KVM MSRs enabled bit

2011-07-11 Thread Glauber Costa
This patch is simple, put in a different commit so it can be more easily shared between guest and hypervisor. It just defines a named constant to indicate the enable bit for KVM-specific MSRs. Signed-off-by: Glauber Costa glom...@redhat.com Acked-by: Rik van Riel r...@redhat.com Tested-by: Eric B

[PATCH v6 7/9] KVM-GST: KVM Steal time accounting

2011-07-11 Thread Glauber Costa
scheduler give us the advantage of direct acess to the runqueue data. In a later opportunity, it can be used to tweak cpu power and make the scheduler aware of the time it lost. Signed-off-by: Glauber Costa glom...@redhat.com Acked-by: Rik van Riel r...@redhat.com Acked-by: Peter Zijlstra pet

[PATCH v6 4/9] KVM-HV: KVM Steal time implementation

2011-07-11 Thread Glauber Costa
part of the steal time infrasructure, and can be backported independently of the guest portion. Signed-off-by: Glauber Costa glom...@redhat.com Tested-by: Eric B Munson emun...@mgebm.net CC: Rik van Riel r...@redhat.com CC: Jeremy Fitzhardinge jeremy.fitzhardi...@citrix.com CC: Peter Zijlstra pet

[PATCH v6 9/9] KVM-GST: KVM Steal time registration

2011-07-11 Thread Glauber Costa
This patch implements the kvm bits of the steal time infrastructure. The most important part of it, is the steal time clock. It is an continuous clock that shows the accumulated amount of steal time since vcpu creation. It is supposed to survive cpu offlining/onlining. Signed-off-by: Glauber

[PATCH v6 5/9] KVM-GST: Add a pv_ops stub for steal time

2011-07-11 Thread Glauber Costa
-by: Glauber Costa glom...@redhat.com Acked-by: Rik van Riel r...@redhat.com Tested-by: Eric B Munson emun...@mgebm.net CC: Jeremy Fitzhardinge jeremy.fitzhardi...@citrix.com CC: Peter Zijlstra pet...@infradead.org CC: Avi Kivity a...@redhat.com CC: Anthony Liguori aligu...@us.ibm.com --- arch/x86/include

[PATCH v6 8/9] KVM-GST: adjust scheduler cpu power

2011-07-11 Thread Glauber Costa
in update_rq_clock(). Signed-off-by: Glauber Costa glom...@redhat.com Acked-by: Rik van Riel r...@redhat.com Acked-by: Peter Zijlstra pet...@infradead.org Tested-by: Eric B Munson emun...@mgebm.net CC: Jeremy Fitzhardinge jeremy.fitzhardi...@citrix.com CC: Avi Kivity a...@redhat.com CC: Anthony Liguori aligu

[PATCH v6 0/9] Steal time for KVM

2011-07-11 Thread Glauber Costa
Hi guys, All ACKs being collected, I hope this can be merged. Only patch 4/9 differs from the last submission. It merges Marcelo's suggestions, so I didn't transposed the other ACKs to it All the rest, is kept the same. Enjoy Glauber Costa (8): KVM-HDR Add constant to represent KVM MSRs

[PATCH v6 1/9] introduce kvm_read_guest_cached

2011-07-11 Thread Glauber Costa
From: Gleb Natapov g...@redhat.com Introduce kvm_read_guest_cached() function in addition to write one we already have. [ by glauber: export function signature in kvm header ] Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Glauber Costa glom...@redhat.com Acked-by: Rik van Riel r

[PATCH v6 3/9] KVM-HDR: KVM Steal time implementation

2011-07-11 Thread Glauber Costa
, KVM_MSR_STEAL_TIME, that holds the memory area address containing information about steal time This patch contains the headers for it. I am keeping it separate to facilitate backports to people who wants to backport the kernel part but not the hypervisor, or the other way around. Signed-off-by: Glauber

[PATCH v6 6/9] add jump labels for ia64 paravirt

2011-07-11 Thread Glauber Costa
Since in a later patch I intend to call jump labels inside CONFIG_PARAVIRT, IA64 would fail to compile if they are not provided. This patch provides those jump labels for the IA64 architecture. Signed-off-by: Glauber Costa glom...@redhat.com Acked-by: Isaku Yamahata yamah...@valinux.co.jp Acked

Re: [PATCH v5 4/9] KVM-HV: KVM Steal time implementation

2011-07-07 Thread Glauber Costa
On 07/07/2011 07:51 AM, Marcelo Tosatti wrote: On Mon, Jul 04, 2011 at 11:32:23AM -0400, Glauber Costa wrote: To implement steal time, we need the hypervisor to pass the guest information about how much time was spent running other processes outside the VM, while the vcpu had meaningful work

[PATCH v5 0/9] Steal time for KVM

2011-07-04 Thread Glauber Costa
to __always_inline. Glauber Costa (8): KVM-HDR Add constant to represent KVM MSRs enabled bit KVM-HDR: KVM Steal time implementation KVM-HV: KVM Steal time implementation KVM-GST: Add a pv_ops stub for steal time add jump labels for ia64 paravirt KVM-GST: KVM Steal time accounting KVM-GST: adjust

[PATCH v5 1/9] introduce kvm_read_guest_cached

2011-07-04 Thread Glauber Costa
From: Gleb Natapov g...@redhat.com Introduce kvm_read_guest_cached() function in addition to write one we already have. [ by glauber: export function signature in kvm header ] Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Glauber Costa glom...@redhat.com --- include/linux

[PATCH v5 3/9] KVM-HDR: KVM Steal time implementation

2011-07-04 Thread Glauber Costa
, KVM_MSR_STEAL_TIME, that holds the memory area address containing information about steal time This patch contains the headers for it. I am keeping it separate to facilitate backports to people who wants to backport the kernel part but not the hypervisor, or the other way around. Signed-off-by: Glauber

[PATCH v5 4/9] KVM-HV: KVM Steal time implementation

2011-07-04 Thread Glauber Costa
part of the steal time infrasructure, and can be backported independently of the guest portion. Signed-off-by: Glauber Costa glom...@redhat.com CC: Rik van Riel r...@redhat.com CC: Jeremy Fitzhardinge jeremy.fitzhardi...@citrix.com CC: Peter Zijlstra pet...@infradead.org CC: Avi Kivity

[PATCH v5 2/9] KVM-HDR Add constant to represent KVM MSRs enabled bit

2011-07-04 Thread Glauber Costa
This patch is simple, put in a different commit so it can be more easily shared between guest and hypervisor. It just defines a named constant to indicate the enable bit for KVM-specific MSRs. Signed-off-by: Glauber Costa glom...@redhat.com CC: Rik van Riel r...@redhat.com CC: Jeremy Fitzhardinge

[PATCH v5 8/9] KVM-GST: adjust scheduler cpu power

2011-07-04 Thread Glauber Costa
in update_rq_clock(). Signed-off-by: Glauber Costa glom...@redhat.com CC: Rik van Riel r...@redhat.com CC: Jeremy Fitzhardinge jeremy.fitzhardi...@citrix.com CC: Peter Zijlstra pet...@infradead.org CC: Avi Kivity a...@redhat.com CC: Anthony Liguori aligu...@us.ibm.com CC: Eric B Munson emun...@mgebm.net

[PATCH v5 5/9] KVM-GST: Add a pv_ops stub for steal time

2011-07-04 Thread Glauber Costa
-by: Glauber Costa glom...@redhat.com CC: Rik van Riel r...@redhat.com CC: Jeremy Fitzhardinge jeremy.fitzhardi...@citrix.com CC: Peter Zijlstra pet...@infradead.org CC: Avi Kivity a...@redhat.com CC: Anthony Liguori aligu...@us.ibm.com CC: Eric B Munson emun...@mgebm.net --- arch/x86/include/asm/paravirt.h

[PATCH v5 7/9] KVM-GST: KVM Steal time accounting

2011-07-04 Thread Glauber Costa
scheduler give us the advantage of direct acess to the runqueue data. In a later opportunity, it can be used to tweak cpu power and make the scheduler aware of the time it lost. Signed-off-by: Glauber Costa glom...@redhat.com CC: Rik van Riel r...@redhat.com CC: Jeremy Fitzhardinge jeremy.fitzhardi

[PATCH v5 6/9] add jump labels for ia64 paravirt

2011-07-04 Thread Glauber Costa
Since in a later patch I intend to call jump labels inside CONFIG_PARAVIRT, IA64 would fail to compile if they are not provided. This patch provides those jump labels for the IA64 architecture. Signed-off-by: Glauber Costa glom...@redhat.com CC: Isaku Yamahata yamah...@valinux.co.jp CC: Eddie

[PATCH v5 9/9] KVM-GST: KVM Steal time registration

2011-07-04 Thread Glauber Costa
This patch implements the kvm bits of the steal time infrastructure. The most important part of it, is the steal time clock. It is an continuous clock that shows the accumulated amount of steal time since vcpu creation. It is supposed to survive cpu offlining/onlining. Signed-off-by: Glauber

[PATCH v4 0/9] Steal time series again

2011-07-01 Thread Glauber Costa
delayacct on the hypervisor side allow us to simplify the guest code dramatically, since now we don't need to test for is_idle: if we're idle, we won't have steal time and end of story. Hope you enjoy. Glauber Costa (8): KVM-HDR Add constant to represent KVM MSRs enabled bit KVM-HDR: KVM Steal

[PATCH v4 4/9] KVM-HV: KVM Steal time implementation

2011-07-01 Thread Glauber Costa
part of the steal time infrasructure, and can be backported independently of the guest portion. Signed-off-by: Glauber Costa glom...@redhat.com CC: Rik van Riel r...@redhat.com CC: Jeremy Fitzhardinge jeremy.fitzhardi...@citrix.com CC: Peter Zijlstra pet...@infradead.org CC: Avi Kivity

[PATCH v4 2/9] KVM-HDR Add constant to represent KVM MSRs enabled bit

2011-07-01 Thread Glauber Costa
This patch is simple, put in a different commit so it can be more easily shared between guest and hypervisor. It just defines a named constant to indicate the enable bit for KVM-specific MSRs. Signed-off-by: Glauber Costa glom...@redhat.com CC: Rik van Riel r...@redhat.com CC: Jeremy Fitzhardinge

[PATCH v4 8/9] KVM-GST: adjust scheduler cpu power

2011-07-01 Thread Glauber Costa
in update_rq_clock(). Signed-off-by: Glauber Costa glom...@redhat.com CC: Rik van Riel r...@redhat.com CC: Jeremy Fitzhardinge jeremy.fitzhardi...@citrix.com CC: Peter Zijlstra pet...@infradead.org CC: Avi Kivity a...@redhat.com CC: Anthony Liguori aligu...@us.ibm.com CC: Eric B Munson emun...@mgebm.net

[PATCH v4 1/9] introduce kvm_read_guest_cached

2011-07-01 Thread Glauber Costa
From: Gleb Natapov g...@redhat.com Introduce kvm_read_guest_cached() function in addition to write one we already have. [ by glauber: export function signature in kvm header ] Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Glauber Costa glom...@redhat.com --- include/linux

[PATCH v4 5/9] KVM-GST: Add a pv_ops stub for steal time

2011-07-01 Thread Glauber Costa
-by: Glauber Costa glom...@redhat.com CC: Rik van Riel r...@redhat.com CC: Jeremy Fitzhardinge jeremy.fitzhardi...@citrix.com CC: Peter Zijlstra pet...@infradead.org CC: Avi Kivity a...@redhat.com CC: Anthony Liguori aligu...@us.ibm.com CC: Eric B Munson emun...@mgebm.net --- arch/x86/include/asm/paravirt.h

[PATCH v4 6/9] add jump labels for ia64 paravirt

2011-07-01 Thread Glauber Costa
Since in a later patch I intend to call jump labels inside CONFIG_PARAVIRT, IA64 would fail to compile if they are not provided. This patch provides those jump labels for the IA64 architecture. Signed-off-by: Glauber Costa glom...@redhat.com CC: Isaku Yamahata yamah...@valinux.co.jp CC: Eddie

[PATCH v4 7/9] KVM-GST: KVM Steal time accounting

2011-07-01 Thread Glauber Costa
scheduler give us the advantage of direct access to the runqueue data. In a later opportunity, it can be used to tweak cpu power and make the scheduler aware of the time it lost. Signed-off-by: Glauber Costa glom...@redhat.com CC: Rik van Riel r...@redhat.com CC: Jeremy Fitzhardinge jeremy.fitzhardi

[PATCH v4 9/9] KVM-GST: KVM Steal time registration

2011-07-01 Thread Glauber Costa
This patch implements the kvm bits of the steal time infrastructure. The most important part of it, is the steal time clock. It is an continuous clock that shows the accumulated amount of steal time since vcpu creation. It is supposed to survive cpu offlining/onlining. Signed-off-by: Glauber

[PATCH v4 3/9] KVM-HDR: KVM Steal time implementation

2011-07-01 Thread Glauber Costa
, KVM_MSR_STEAL_TIME, that holds the memory area address containing information about steal time This patch contains the headers for it. I am keeping it separate to facilitate backports to people who wants to backport the kernel part but not the hypervisor, or the other way around. Signed-off-by: Glauber

Re: [PATCH v3 2/9] KVM-HDR Add constant to represent KVM MSRs enabled bit

2011-06-30 Thread Glauber Costa
On 06/30/2011 09:59 AM, Eric B Munson wrote: On Thu, 30 Jun 2011, Avi Kivity wrote: On 06/30/2011 12:56 AM, Eric B Munson wrote: My mail provider seems to have dropped patch 1 of the series so I can't reply directly to it, please add my Tested-by there as well. How did you test it then?

Re: [PATCH v3 7/9] KVM-GST: KVM Steal time accounting

2011-06-30 Thread Glauber Costa
On 06/30/2011 06:54 PM, Peter Zijlstra wrote: On Wed, 2011-06-29 at 11:29 -0400, Glauber Costa wrote: +static noinline bool touch_steal_time(int is_idle) That noinline is very unlucky there, +{ + u64 steal, st = 0; + + if (static_branch(paravirt_steal_enabled

Re: [PATCH v3 7/9] KVM-GST: KVM Steal time accounting

2011-06-30 Thread Glauber Costa
On 06/30/2011 06:54 PM, Peter Zijlstra wrote: On Wed, 2011-06-29 at 11:29 -0400, Glauber Costa wrote: This patch accounts steal time time in kernel/sched. I kept it from last proposal, because I still see advantages in it: Doing it here will give us easier access from scheduler variables

Re: [PATCH v3 7/9] KVM-GST: KVM Steal time accounting

2011-06-30 Thread Glauber Costa
On 06/30/2011 06:54 PM, Peter Zijlstra wrote: On Wed, 2011-06-29 at 11:29 -0400, Glauber Costa wrote: + if (static_branch(paravirt_steal_enabled)) { How is that going to compile on !CONFIG_PARAVIRT or !x86 in general? Only x86-PARAVIRT will provide that variable. Good point. I'd

[PATCH v3 6/9] KVM-GST: Add a pv_ops stub for steal time

2011-06-29 Thread Glauber Costa
This patch adds a function pointer in one of the many paravirt_ops structs, to allow guests to register a steal time function. Signed-off-by: Glauber Costa glom...@redhat.com CC: Rik van Riel r...@redhat.com CC: Jeremy Fitzhardinge jeremy.fitzhardi...@citrix.com CC: Peter Zijlstra pet

[PATCH v3 2/9] KVM-HDR Add constant to represent KVM MSRs enabled bit

2011-06-29 Thread Glauber Costa
This patch is simple, put in a different commit so it can be more easily shared between guest and hypervisor. It just defines a named constant to indicate the enable bit for KVM-specific MSRs. Signed-off-by: Glauber Costa glom...@redhat.com CC: Rik van Riel r...@redhat.com CC: Jeremy Fitzhardinge

[PATCH v3 0/9] Steal time for KVM

2011-06-29 Thread Glauber Costa
, as suggested by Gleb. On the guest side, the two prev_steal_time variables are colapsed into a single one. Steal time accounting is also done inside update_rq_clock(). Glauber Costa (8): KVM-HDR Add constant to represent KVM MSRs enabled bit KVM-HDR: KVM Steal time implementation KVM-HV: KVM Steal

[PATCH v3 8/9] KVM-GST: adjust scheduler cpu power

2011-06-29 Thread Glauber Costa
the overall throughput. Signed-off-by: Glauber Costa glom...@redhat.com CC: Rik van Riel r...@redhat.com CC: Jeremy Fitzhardinge jeremy.fitzhardi...@citrix.com CC: Peter Zijlstra pet...@infradead.org CC: Avi Kivity a...@redhat.com CC: Anthony Liguori aligu...@us.ibm.com CC: Eric B Munson emun...@mgebm.net

[PATCH v3 3/9] KVM-HDR: KVM Steal time implementation

2011-06-29 Thread Glauber Costa
, KVM_MSR_STEAL_TIME, that holds the memory area address containing information about steal time This patch contains the headers for it. I am keeping it separate to facilitate backports to people who wants to backport the kernel part but not the hypervisor, or the other way around. Signed-off-by: Glauber

[PATCH v3 4/9] KVM-HV: KVM Steal time implementation

2011-06-29 Thread Glauber Costa
. Signed-off-by: Glauber Costa glom...@redhat.com CC: Rik van Riel r...@redhat.com CC: Jeremy Fitzhardinge jeremy.fitzhardi...@citrix.com CC: Peter Zijlstra pet...@infradead.org CC: Avi Kivity a...@redhat.com CC: Anthony Liguori aligu...@us.ibm.com CC: Eric B Munson emun...@mgebm.net --- arch/x86

[PATCH v3 9/9] KVM-GST: KVM Steal time registration

2011-06-29 Thread Glauber Costa
Register steal time within KVM. Everytime we sample the steal time information, we update a local variable that tells what was the last time read. We then account the difference. Signed-off-by: Glauber Costa glom...@redhat.com CC: Rik van Riel r...@redhat.com CC: Jeremy Fitzhardinge

[PATCH v3 1/9] introduce kvm_read_guest_cached

2011-06-29 Thread Glauber Costa
From: Gleb Natapov g...@redhat.com Introduce kvm_read_guest_cached() function in addition to write one we already have. [ by glauber: export function signature in kvm header ] Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Glauber Costa glom...@redhat.com --- include/linux

[PATCH v3 5/9] KVM-HV: use schedstats to calculate steal time

2011-06-29 Thread Glauber Costa
won't want to record statistics about all processes running, the previous method of time measurement on put/load vcpu is kept for !SCHEDSTATS. Signed-off-by: Glauber Costa glom...@redhat.com CC: Rik van Riel r...@redhat.com CC: Jeremy Fitzhardinge jeremy.fitzhardi...@citrix.com CC: Peter Zijlstra

[PATCH v3 7/9] KVM-GST: KVM Steal time accounting

2011-06-29 Thread Glauber Costa
() can be called from multiple places, not only account_process_tick(), steal time grabbing is repeated in each account function separatedely. Signed-off-by: Glauber Costa glom...@redhat.com CC: Rik van Riel r...@redhat.com CC: Jeremy Fitzhardinge jeremy.fitzhardi...@citrix.com CC: Peter Zijlstra pet

Re: [PATCH v2 3/7] KVM-HV: KVM Steal time implementation

2011-06-28 Thread Glauber Costa
On 06/20/2011 05:56 PM, Marcelo Tosatti wrote: On Sun, Jun 19, 2011 at 12:57:53PM +0300, Avi Kivity wrote: On 06/17/2011 01:20 AM, Glauber Costa wrote: To implement steal time, we need the hypervisor to pass the guest information about how much time was spent running other processes outside

Re: [PATCH 3/7] KVM-HV: KVM Steal time implementation

2011-06-20 Thread Glauber Costa
On 06/20/2011 05:02 AM, Avi Kivity wrote: On 06/20/2011 10:21 AM, Gleb Natapov wrote: On Sun, Jun 19, 2011 at 04:02:22PM +0300, Avi Kivity wrote: On 06/19/2011 03:59 PM, Gleb Natapov wrote: On Sun, Jun 19, 2011 at 03:35:58PM +0300, Avi Kivity wrote: On 06/15/2011 12:09 PM, Gleb Natapov

Re: [PATCH v2 5/7] KVM-GST: KVM Steal time accounting

2011-06-19 Thread Glauber Costa
On 06/19/2011 07:04 AM, Avi Kivity wrote: On 06/17/2011 01:20 AM, Glauber Costa wrote: This patch accounts steal time time in kernel/sched. I kept it from last proposal, because I still see advantages in it: Doing it here will give us easier access from scheduler variables such as the cpu rq

  1   2   3   4   5   6   7   8   9   10   >