search for: config_guest_accounting

Displaying 4 results from an estimated 4 matches for "config_guest_accounting".

2007 Aug 20
3
[PATCH 2/4] Introduce a new fields "gtime" and "cgtime" in task_struct and signal_struct
...D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- kvm.orig/fs/proc/array.c 2007-08-20 11:11:30.000000000 +0200 +++ kvm/fs/proc/array.c 2007-08-20 13:04:03.000000000 +0200 @@ -354,6 +354,15 @@ static clock_t task_stime(struct task_st return stime; } = +#ifdef CONFIG_GUEST_ACCOUNTING +static clock_t task_gtime(struct task_struct *p) +{ + clock_t gtime =3D cputime_to_clock_t(p->gtime); + + return gtime; +} +#endif + static int do_task_stat(struct task_struct *task, char *buffer, int whole) { unsigned long vsize, eip, esp, wchan =3D ~0UL; @@ -369,6 +378,10 @@ static int do...
2007 Aug 20
3
[PATCH 2/4] Introduce a new fields "gtime" and "cgtime" in task_struct and signal_struct
...D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- kvm.orig/fs/proc/array.c 2007-08-20 11:11:30.000000000 +0200 +++ kvm/fs/proc/array.c 2007-08-20 13:04:03.000000000 +0200 @@ -354,6 +354,15 @@ static clock_t task_stime(struct task_st return stime; } = +#ifdef CONFIG_GUEST_ACCOUNTING +static clock_t task_gtime(struct task_struct *p) +{ + clock_t gtime =3D cputime_to_clock_t(p->gtime); + + return gtime; +} +#endif + static int do_task_stat(struct task_struct *task, char *buffer, int whole) { unsigned long vsize, eip, esp, wchan =3D ~0UL; @@ -369,6 +378,10 @@ static int do...
2007 Aug 20
0
[PATCH 3/4] modify account_system_time() to update guest time in cpustat and task_struct
...3D=3D=3D --- kvm.orig/kernel/sched.c 2007-08-20 11:11:30.000000000 +0200 +++ kvm/kernel/sched.c 2007-08-20 13:21:24.000000000 +0200 @@ -3246,10 +3246,24 @@ void account_system_time(struct task_str struct rq *rq =3D this_rq(); cputime64_t tmp; = + tmp =3D cputime_to_cputime64(cputime); +#ifdef CONFIG_GUEST_ACCOUNTING + if (p->flags & PF_VCPU) { + p->utime =3D cputime_add(p->utime, cputime); + p->gtime =3D cputime_add(p->gtime, cputime); + + cpustat->guest =3D cputime64_add(cpustat->guest, tmp); + cpustat->user =3D cputime64_add(cpustat->user, tmp); + + p->flags &=3D ~P...
2007 Aug 20
0
[PATCH 3/4] modify account_system_time() to update guest time in cpustat and task_struct
...3D=3D=3D --- kvm.orig/kernel/sched.c 2007-08-20 11:11:30.000000000 +0200 +++ kvm/kernel/sched.c 2007-08-20 13:21:24.000000000 +0200 @@ -3246,10 +3246,24 @@ void account_system_time(struct task_str struct rq *rq =3D this_rq(); cputime64_t tmp; = + tmp =3D cputime_to_cputime64(cputime); +#ifdef CONFIG_GUEST_ACCOUNTING + if (p->flags & PF_VCPU) { + p->utime =3D cputime_add(p->utime, cputime); + p->gtime =3D cputime_add(p->gtime, cputime); + + cpustat->guest =3D cputime64_add(cpustat->guest, tmp); + cpustat->user =3D cputime64_add(cpustat->user, tmp); + + p->flags &=3D ~P...