Displaying 6 results from an estimated 6 matches for "cputime_to_cputime64".
2007 Aug 20
0
[PATCH 3/4] modify account_system_time() to update guest time in cpustat and task_struct
...3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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-&g...
2007 Aug 20
0
[PATCH 3/4] modify account_system_time() to update guest time in cpustat and task_struct
...3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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-&g...
2007 Aug 20
4
[PATCH 0/4] Virtual Machine Time Accounting
The aim of these four patches is to introduce Virtual Machine time accounting.
_Ingo_, as these patches modify files of the scheduler, could you have a look to
them, please ?
[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
2007 Aug 20
4
[PATCH 0/4] Virtual Machine Time Accounting
The aim of these four patches is to introduce Virtual Machine time accounting.
_Ingo_, as these patches modify files of the scheduler, could you have a look to
them, please ?
[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
2007 Apr 18
0
[RFC, PATCH 23/24] i386 Vmi timer patch
...-0800
+++ linux-2.6.16-rc6/kernel/sched.c 2006-03-12 19:57:48.000000000 -0800
@@ -2535,18 +2535,33 @@ void account_system_time(struct task_str
*/
void account_steal_time(struct task_struct *p, cputime_t steal)
{
- struct cpu_usage_stat *cpustat = &kstat_this_cpu.cpustat;
- cputime64_t tmp = cputime_to_cputime64(steal);
+ struct cpu_usage_stat *cpustat;
+ cputime64_t tmp;
runqueue_t *rq = this_rq();
if (p == rq->idle) {
+ cpustat = &kstat_this_cpu.cpustat;
+ tmp = cputime_to_cputime64(steal);
+
p->stime = cputime_add(p->stime, steal);
if (atomic_read(&rq->nr_iowait) >...
2007 Apr 18
0
[RFC, PATCH 23/24] i386 Vmi timer patch
...-0800
+++ linux-2.6.16-rc6/kernel/sched.c 2006-03-12 19:57:48.000000000 -0800
@@ -2535,18 +2535,33 @@ void account_system_time(struct task_str
*/
void account_steal_time(struct task_struct *p, cputime_t steal)
{
- struct cpu_usage_stat *cpustat = &kstat_this_cpu.cpustat;
- cputime64_t tmp = cputime_to_cputime64(steal);
+ struct cpu_usage_stat *cpustat;
+ cputime64_t tmp;
runqueue_t *rq = this_rq();
if (p == rq->idle) {
+ cpustat = &kstat_this_cpu.cpustat;
+ tmp = cputime_to_cputime64(steal);
+
p->stime = cputime_add(p->stime, steal);
if (atomic_read(&rq->nr_iowait) >...