From: Christian Borntraeger <borntraeger-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
To: Laurent Vivier <Laurent.Vivier-6ktuUTfB/bM@public.gmane.org>
Cc: kvm-devel
<kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
linux-kernel
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
virtualization
<virtualization-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>
Subject: Re: [PATCH/RFC 3/4]Introduce "account modifiers" mechanism
Date: Fri, 17 Aug 2007 15:32:32 +0200 [thread overview]
Message-ID: <200708171532.32850.borntraeger@de.ibm.com> (raw)
In-Reply-To: <46C59DC6.4020308-6ktuUTfB/bM@public.gmane.org>
Am Freitag, 17. August 2007 schrieb Laurent Vivier:
> > The normal user/system accounting has the same issue, no? Whereever we
> > happen to land (kernel or user) gets the whole tick.
>
> Yes... but perhaps I should rewrite this too ;-)
If you look further, you will see, that this was actually rewritten in 2.6.12
and thats why we have cputime_t. The infrastructure is currently only used by
s390 and ppc64. On s390 we use our cpu timer to get the current time on each
syscall/irq/context switch etc to get precise accounting data for
system/user/irq/softirq/nice. We also get steal time (this is interesting for
the guest: how much of my cpu was actually not available because the
hypervisor scheduled me away). I dont know enough about other architectures
to say which one could exploit this infrastructure as well.
The current git tree is somewhat broken for CONFIG_VIRT_CPU_ACCOUTING due to
the accouting changes introduced by CFS - we work on this.
If you are interested in the cputime stuff, you can have a look at
arch/s390/kernel/vtime.c (account_system_vtime, account_vtime) as well as:
http://git.kernel.org/?p=linux/kernel/git/torvalds/old-2.6-bkcvs.git;a=commit;h=6be7071fdd321c206b1ee7a3e534782f25572830
for the first introduction and
http://git.kernel.org/?p=linux/kernel/git/torvalds/old-2.6-bkcvs.git;a=commit;h=db59f519d37f80683f3611927f6b5c3bdfc0f9e6
for the s390 exploitation.
Christian
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
next prev parent reply other threads:[~2007-08-17 13:32 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <46C4719A.2060308@bull.net>
2007-08-16 15:57 ` [PATCH/RFC 1/4]Introduce a new field "guest" in cpustat Laurent Vivier
[not found] ` <46C4720F.7030304@bull.net>
2007-08-16 15:57 ` [PATCH/RFC 2/4]Introduce a new field "guest" in task_struct Laurent Vivier
[not found] ` <46C4725A.4070607@bull.net>
2007-08-16 15:58 ` [PATCH/RFC 3/4]Introduce "account modifiers" mechanism Laurent Vivier
2007-08-16 22:39 ` Rusty Russell
[not found] ` <1187303955.6449.7.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-08-17 7:35 ` Laurent Vivier
[not found] ` <46C54FB8.7050504-6ktuUTfB/bM@public.gmane.org>
2007-08-17 8:30 ` Rusty Russell
[not found] ` <1187339450.6449.115.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-08-17 9:16 ` Laurent Vivier
[not found] ` <46C56774.2030009-6ktuUTfB/bM@public.gmane.org>
2007-08-17 11:51 ` [PATCH/RFC 3/4, second shot]Introduce "account_guest_time" Laurent Vivier
2007-08-17 11:54 ` [PATCH/RFC 4/4, second shot]KVM uses "account_guest_time()" Laurent Vivier
[not found] ` <46C58C8C.3080803-6ktuUTfB/bM@public.gmane.org>
2007-08-17 13:03 ` Avi Kivity
[not found] ` <46C59C92.40902-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-08-17 13:16 ` Laurent Vivier
[not found] ` <46C59FA6.7020601-6ktuUTfB/bM@public.gmane.org>
2007-08-19 7:39 ` Avi Kivity
2007-08-17 12:59 ` [kvm-devel] [PATCH/RFC 3/4, second shot]Introduce "account_guest_time" Avi Kivity
2007-08-17 12:55 ` [PATCH/RFC 3/4]Introduce "account modifiers" mechanism Avi Kivity
[not found] ` <46C59AB1.6070505-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-08-17 13:08 ` Laurent Vivier
[not found] ` <46C59DC6.4020308-6ktuUTfB/bM@public.gmane.org>
2007-08-17 13:32 ` Christian Borntraeger [this message]
2007-08-19 7:41 ` Avi Kivity
2007-08-17 14:12 ` Laurent Vivier
[not found] ` <46C5ACE8.2050004-6ktuUTfB/bM@public.gmane.org>
2007-08-19 7:38 ` Avi Kivity
[not found] ` <46C7F362.80106-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-08-20 7:30 ` Laurent Vivier
[not found] ` <46C94306.8080300-6ktuUTfB/bM@public.gmane.org>
2007-08-20 7:55 ` Avi Kivity
[not found] ` <46C472D2.7000702@bull.net>
2007-08-16 15:59 ` [PATCH/RFC 4/4]Modify KVM to use the "account modifiers" Laurent Vivier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200708171532.32850.borntraeger@de.ibm.com \
--to=borntraeger-ta70fqpds9bqt0dzr+alfa@public.gmane.org \
--cc=Laurent.Vivier-6ktuUTfB/bM@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=virtualization-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox