_time().
http://lkml.org/lkml/2007/10/15/183
Signed-off-by: Laurent Vivier <[EMAIL PROTECTED]>
---
drivers/kvm/kvm.h |1 +
drivers/kvm/kvm_main.c |3 ++-
kernel/sched.c |1 -
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/kvm/kvm.h b/driver
No more comments: I agree.
We can move the "&= ~PF_VCPU" to kvm_guest_exit() and remove it from
account_system_time(). Moreover it will simplify the code for s390...
Regards,
Laurent
Avi Kivity wrote:
Laurent Vivier wrote:
Avi Kivity wrote:
Laurent Vivier wrote:
Christian Borntraeger wrote:
> Am Montag, 15. Oktober 2007 schrieb Laurent Vivier:
>>> Any idea how to make this proper on all architectures? I will have a look.
>> I think the solution is to have an arch dependent kvm_guest_exit(): empty for
>> x86, clearing the bit for s
Avi Kivity wrote:
> Laurent Vivier wrote:
>
>
>
>>> But if we didn't get an interrupt in that time?
>>>
>>> We can clear it a bit later, after local_irq_enable() in
>>> __vcpu_run(). However we need a nop instruction first because
Avi Kivity wrote:
> Laurent Vivier wrote:
>> Avi Kivity wrote:
>>
>>> Ingo Molnar wrote:
>>>
>>>> * Avi Kivity <[EMAIL PROTECTED]> wrote:
>>>>
>>>>
>>>>
>>>>> This bit can go; for
Christian Borntraeger wrote:
> Am Montag, 15. Oktober 2007 schrieb Avi Kivity:
>> We can clear it a bit later, after local_irq_enable() in __vcpu_run().
>> However we need a nop instruction first because "sti" keeps interrupts
>> disabled for one more instruction.
>
> Ah, I see. The host interr
Avi Kivity wrote:
> Ingo Molnar wrote:
>> * Avi Kivity <[EMAIL PROTECTED]> wrote:
>>
>>
>>> This bit can go; for the external module I can add it back in
>>> external-module-compat.h. No need to pollute mainline with backward
>>> compatibility stuff.
>>>
>>
>> hm:
>>
>> static inline void k
Andrew Morton wrote:
> On Fri, 28 Sep 2007 11:18:45 +0200 Laurent Vivier <[EMAIL PROTECTED]> wrote:
>
>> Andrew Morton wrote:
>>> On Fri, 28 Sep 2007 10:52:08 +0200 Laurent Vivier <[EMAIL PROTECTED]> wrote:
>>>> Andi, is this correct ?
>>>&g
Andrew Morton wrote:
> On Fri, 28 Sep 2007 10:52:08 +0200 Laurent Vivier <[EMAIL PROTECTED]> wrote:
>
>> Fengguang Wu wrote:
>>> On Thu, Sep 27, 2007 at 02:22:20AM -0700, Andrew Morton wrote:
>>>> ftp://ftp.kernel.org/pub/linux/kernel/people/akp
Fengguang Wu wrote:
> On Thu, Sep 27, 2007 at 02:22:20AM -0700, Andrew Morton wrote:
>> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.23-rc8/2.6.23-rc8-mm2/
>
> Laurent,
>
> It triggered a WARNING on first run in qemu:
Thank you to report it.
>
> [0.31] WARNING: at
Ingo Molnar wrote:
> * Laurent Vivier <[EMAIL PROTECTED]> wrote:
>
>> This new version remove conditional compilation on GUEST_ACCOUNTING.
>
> excellent! For all 4 patches:
>
> Acked-by: Ingo Molnar <[EMAIL PROTECTED]>
>
> i'd suggest inclusion i
Alistair John Strachan wrote:
> On Monday 10 September 2007 14:08:45 Laurent Vivier wrote:
>> Avi Kivity wrote:
>>> Ingo Molnar wrote:
>>>> * Laurent Vivier <[EMAIL PROTECTED]> wrote:
>>>>> Ingo, please, could you have a look to these patche
Randy Dunlap wrote:
> On Mon, 10 Sep 2007 16:12:58 +0200 Laurent Vivier wrote:
>
>> [PATCH 3/4] modify account_system_time() to add cputime to cpustat->guest if
>> we
>> are running a VCPU. We add this cputime to cpustat->user instead of
>> cpustat->sys
Rik van Riel wrote:
> Laurent Vivier wrote:
>> [PATCH 1/4] as recent CPUs introduce a third running state, after
>> "user" and
>> "system", we need a new field, "guest", in cpustat to store the time
>> used by
>> the CPU to run virtual
[PATCH 4/4] Modify KVM to update guest time accounting.
Signed-off-by: Laurent Vivier <[EMAIL PROTECTED]>
--
- [EMAIL PROTECTED] --
"Software is hard" - Donald Knuth
Index: linux-2.6/d
[PATCH 2/4] like for cpustat, introduce the "gtime" (guest time of the task) and
"cgtime" (guest time of the task children) fields for the
tasks. Modify signal_struct and task_struct. Modify /proc//stat to display
these new fields.
Signed-off-by: Laurent Vivi
guest and user to
allow an unmodified "top(1)" to display correct value. A modified "top(1)" is
able to display good cpu user time and cpu guest time by subtracting cpu guest
time from cpu user time. Update "gtime" in task_struct accordingly.
Signed-o
"gtime" and "cgtime" in signal_struct and
task_struct accordingly.
[PATCH 4/4] Modify KVM to update guest time accounting.
Signed-off-by: Laurent Vivier <[EMAIL PROTECTED]>
--
- [EMAIL PROTECTED] --
"Software is hard" - Donald K
[PATCH 1/4] as recent CPUs introduce a third running state, after "user" and
"system", we need a new field, "guest", in cpustat to store the time used by
the CPU to run virtual CPU. Modify /proc/stat to display this new field.
Signed-off-by: La
Avi Kivity wrote:
> Ingo Molnar wrote:
>> * Laurent Vivier <[EMAIL PROTECTED]> wrote:
>>
>>
>>> Ingo, please, could you have a look to these patches ?
>>>
>>> The aim of these four patches is to introduce Virtual Machine time
>>> a
Ingo Molnar wrote:
> * Laurent Vivier <[EMAIL PROTECTED]> wrote:
>
>> Ingo, please, could you have a look to these patches ?
>>
>> The aim of these four patches is to introduce Virtual Machine time
>> accounting.
>>
>> [PATCH 1/4] as recent CPUs
[PATCH 4/4] Modify KVM to update guest time accounting.
Signed-off-by: Laurent Vivier <[EMAIL PROTECTED]>
--
- [EMAIL PROTECTED] --
"Software is hard" - Donald Knuth
Index: linux-2.6/dri
[PATCH 2/4] like for cpustat, introduce the "gtime" (guest time of the task) and
"cgtime" (guest time of the task children) fields for the
tasks. Modify signal_struct and task_struct. Modify /proc//stat to display
these new fields.
Signed-off-by: Laurent Vivi
guest and user to
allow an unmodified "top(1)" to display correct value. A modified "top(1)" is
able to display good cpu user time and cpu guest time by subtracting cpu guest
time from cpu user time. Update "gtime" in task_struct accordingly.
Signed-o
[PATCH 1/4] as recent CPUs introduce a third running state, after "user" and
"system", we need a new field, "guest", in cpustat to store the time used by
the CPU to run virtual CPU. Modify /proc/stat to display this new field.
Signed-off-by: La
;cgtime" in signal_struct and
task_struct accordingly.
[PATCH 4/4] Modify KVM to update guest time accounting.
Signed-off-by: Laurent Vivier <[EMAIL PROTECTED]>
--
- [EMAIL PROTECTED] --
"Software is hard" - Donald Knuth
-
To unsubscribe fr
> On Fri, 24 Aug 2007 17:36:35 +0200
> Laurent Vivier <[EMAIL PROTECTED]> wrote:
>
> > This patch export i386 smp_call_function_mask() with EXPORT_SYMBOL().
> >
> > This function is needed by KVM to call a function on a set of CPUs.
> >
> > arch/i386
This patch export i386 smp_call_function_mask() with EXPORT_SYMBOL().
This function is needed by KVM to call a function on a set of CPUs.
arch/i386/kernel/smp.c |7 +++
include/asm-i386/smp.h |9 +++--
2 files changed, 10 insertions(+), 6 deletions(-)
Signed-off-by: Laurent
118 ---
include/asm-x86_64/smp.h |2
2 files changed, 64 insertions(+), 56 deletions(-)
Signed-off-by: Laurent Vivier <[EMAIL PROTECTED]>
Index: kvm/arch/x86_64/kernel/smp.c
===
--- kvm.orig/arch/x86_64/kernel/sm
Andi Kleen wrote:
> On Thursday 23 August 2007 09:36:05 Laurent Vivier wrote:
>> This patch defines the missing function smp_call_function_mask() for x86_64,
>> this is more or less a cut&paste of i386 function.
>
> What do you need it for?
Hi Andi,
it is for KVM:
driv
This patch defines the missing function smp_call_function_mask() for x86_64,
this is more or less a cut&paste of i386 function.
Signed-off-by: Laurent Vivier <[EMAIL PROTECTED]>
Index: kvm/arch/x86_64/kernel/smp.c
===
--
Glauber de Oliveira Costa wrote:
>> by doing this at kernel level, we can:
>> - measure exactly the guest time,
>> - move this part of system time to user time (as you think it should be
>> user time),
>> - have consistency between system, user and guest time,
>> - report values in /proc/state and
> Laurent Vivier wrote:
> functionnalities:
>
> > - allow to measure time spent by a CPU in a virtual CPU.
> > - allow to display in /proc/state this value by CPU
> > - allow to display in /proc//state this value by process
> > - allow KVM to use these 3 pre
Hi John,
John Stoffel wrote:
>
> Laurent> The aim of these four patches is to introduce Virtual Machine
> Laurent> time accounting.
>
> So what does this buy us? What increased functionality?
>
functionnalities:
- allow to measure time spent by a CPU in a virtual CPU.
- allow to display in
Avi Kivity wrote:
> Laurent Vivier wrote:
>> Avi Kivity wrote:
>>
>>> Laurent Vivier wrote:
>>>
>>>> [PATCH 4/4] Modify KVM to update guest time accounting.
>>>&
Christian Borntraeger wrote:
> Am Montag, 20. August 2007 schrieb Laurent Vivier:
>> Index: kvm/fs/proc/array.c
>> ===
>> --- kvm.orig/fs/proc/array.c2007-08-20 11:11:30.0 +0200
>> +++ kvm/fs/pr
Avi Kivity wrote:
> Laurent Vivier wrote:
>> [PATCH 4/4] Modify KVM to update guest time accounting.
>>
>>
>
>> Index: kvm/drivers/kvm/kvm.h
>> ===
>> --- kvm.orig/drivers/kvm/kv
[PATCH 4/4] Modify KVM to update guest time accounting.
Signed-off-by: Laurent Vivier <[EMAIL PROTECTED]>
--
- [EMAIL PROTECTED] --
"Software is hard" - Donald Knuth
Index: kvm/d
[PATCH 2/4] like for cpustat, introduce the "gtime" (guest time of the task) and
"cgtime" (guest time of the task children) fields for the
tasks. Modify signal_struct and task_struct. Modify /proc//stat to display
these new fields.
Signed-off-by: Laurent Vivi
guest and user to
allow an unmodified "top(1)" to display correct value. A modified "top(1)" is
able to display good cpu user time and cpu guest time by subtracting cpu guest
time from cpu user time. Update "gtime" in task_struct accordingly.
Signed-o
time. Update "gtime" and "cgtime" in signal_struct and
task_struct accordingly.
[PATCH 4/4] Modify KVM to update guest time accounting.
Signed-off-by: Laurent Vivier <[EMAIL PROTECTED]>
--
- [EMAIL PROTECTED] --
"Software is h
[PATCH 1/4] as recent CPUs introduce a third running state, after "user" and
"system", we need a new field, "guest", in cpustat to store the time used by
the CPU to run virtual CPU. Modify /proc/stat to display this new field.
Signed-off-by: La
Avi Kivity wrote:
> Laurent Vivier wrote:
>> Avi Kivity wrote:
>> [...]
>>
>>> The normal user/system accounting has the same issue, no? Whereever we
>>> happen to land (kernel or user) gets the whole tick.
>>>
>>> So I th
Avi Kivity wrote:
[...]
>
> The normal user/system accounting has the same issue, no? Whereever we
> happen to land (kernel or user) gets the whole tick.
>
> So I think it is okay to have the same limitation for guest time.
>
So this is how it looks like.
PATCH 1 and 2 are always a prerequisit
Avi Kivity wrote:
> Laurent Vivier wrote:
>> KVM updates vtime in task_struct to allow account_guest_time() to modify
>> user,
>> system and guest time in cpustat accordingly.
>>
>
>> --- kvm.orig/drivers/kvm/Kconfig 2007-08-17 10:24:46.0 +0200
Avi Kivity wrote:
> Laurent Vivier wrote:
>>>
>>>> - remove PATCH 3, and add in task_struct a "ktime vtime" where we
>>>> accumulate
>>>> guest time (by calling something like guest_enter() and guest_exit() from
>>>> the
KVM updates vtime in task_struct to allow account_guest_time() to modify user,
system and guest time in cpustat accordingly.
Index: kvm/drivers/kvm/Kconfig
===
--- kvm.orig/drivers/kvm/Kconfig2007-08-17 10:24:46.0 +0200
This is another way to compute guest time... I remove the "account modifiers"
mechanism and call directly account_guest_time() from account_system_time().
account_system_time() computes user, system and guest times according value
accumulated in vtime (a ktime_t) in task_struct by the virtual machi
Rusty Russell wrote:
> On Fri, 2007-08-17 at 09:35 +0200, Laurent Vivier wrote:
>> Rusty Russell wrote:
>>> Hi Laurent,
>> Hi Rusty,
>> how are your puppies ?
>
> They're getting a little fat, actually. Too many features ...
>
>> - remove PATCH
Rusty Russell wrote:
> On Thu, 2007-08-16 at 17:58 +0200, Laurent Vivier wrote:
>> [PATCH 3/3] introduce "account modifiers" mechanism in the kernel allowing a
>> module to modify the collected accounting for a given task. This
>> implementation
>&
[PATCH 4/4] Modify KVM to use the "account modifiers". KVM can now measure time
consumed by a Virtual Machine on a per-cpu basis and modify kernel statistics to
report this value.
Signed-off-by: Laurent Vivier <[EMAIL PROTECTED]>
--
-
PATCH 2/4] like for cpustat, introduce the "guest" and "cguest" fields for the
tasks. Modify
signal_struct and task_struct. Modify /proc//stat to display these new
field
Signed-off-by: Laurent Vivier <[EMAIL PROTECTED]>
--
- [EMAIL PROTECTED] ---
ons registered by a module to modify the
cputime value.
Signed-off-by: Laurent Vivier <[EMAIL PROTECTED]>
--
- [EMAIL PROTECTED] --
"Software is hard" - Donald Knuth
Index: kvm/include/linux/sched.h
==
[PATCH 1/4] as modern CPUs introduce a third running state, after "user" and
"system", we need a new field, "guest", in cpustat to store the time used by
the CPU to run virtual CPU. Modify /proc/stat to display this new field.
Signed-off-by: La
Modify KVM to use the "account modifiers". KVM can now measure time
consumed by a Virtual Machine on a per-cpu basis and modify kernel statistics to
report this value.
Signed-off-by: Laurent Vivier <[EMAIL PROTECTED]>
--
- [EMAIL PROTECTED] --
&
Christian Borntraeger wrote:
> Am Montag, 13. August 2007 schrieb Laurent Vivier:
>>>> As guest accounting is hw dependent, I think we should add a hook in the
>>>> accounting functions.
>>>>
>>> Isn't PF_VM exactly such a hook? All the hy
Avi Kivity wrote:
> Laurent Vivier wrote:
>> Christian Borntraeger wrote:
>>
>>> Am Freitag, 10. August 2007 schrieb Laurent Vivier:
>>>
>>>> The aim of these two patches is to measure the CPU time used by a
>>>> virtual
>>>
Christian Borntraeger wrote:
> Am Freitag, 10. August 2007 schrieb Laurent Vivier:
>> The aim of these two patches is to measure the CPU time used by a virtual
>> machine. All comments are welcome... I'm not sure it's the good way to do
> that.
>
> I did
Avi Kivity wrote:
> Laurent Vivier wrote:
>>> - perhaps the new fields should be guarded by a #ifdef CONFIG_HYPERVISOR
>>> (selected by CONFIG_KVM)? that way the (minor) additional overhead is
>>> only incurred if it can possibly be used. I imagine that our cani
Avi Kivity wrote:
> Laurent Vivier wrote:
>> The aim of these two patches is to measure the CPU time used by a virtual
>> machine. All comments are welcome... I'm not sure it's the good way to
>> do that.
>>
>> [PATCH 1/2] introduce a new field, "
You can find attached to this email the patch to apply to procps-3.2.7[1] to
allow "top(1)" to display the cpu guest time.
Laurent
[1] http://procps.sf.net/procps-3.2.7.tar.gz
--
- [EMAIL PROTECTED] --
"Software is hard" - Donald Knuth
Index: procps-3.2.7/top.c
d user to allow an unmodified
"top(1)" to display correct value. A modified "top(1)" is able to display good
cpu user time and cpu guest time by subtracting cpu guest time from cpu user
time.
Signed-Off-by: Laurent Vivier <[EMAIL PROTECTED]>
introduce a new field, "guest", in cpustat to store the time used by the CPU to
run virtual CPU. Modify /proc/stat to display this new field.
Signed-Off-by: Laurent Vivier <[EMAIL PROTECTED]>
--
- [EMAIL PROTECTED] --
"Software is hard&
e duplicate VCPU time between guest and user to
allow an unmodified "top(1)" to display correct value. A modified "top(1)" is
able to display good cpu user time and cpu guest time by subtracting cpu guest
time from cpu user time.
Signed-Off-by: Laurent Vivier <[
Andrew Morton wrote:
> On Wed, 17 Jan 2007 10:55:54 +0100
> Sébastien Dugué <[EMAIL PROTECTED]> wrote:
>
>> +struct lio_event *lio_create(struct sigevent __user *user_event,
>> +int mode)
>> +{
>> +int ret = 0;
>> +struct lio_event *lio = NULL;
>> +
>> +if (unlikely
ant to merge libposix-aio in
glibc, we should use existing mechanism, and it should be easy to put
POSIX AIO helper thread portions inside the timer helper thread.
But only the glibc maintainer can answer to this question:
should we mixe timer and AIO code ?
Laurent
--
-- Laurent V
201 - 266 of 266 matches
Mail list logo