Re: [kvm-devel] [PATCH/RFC 3/4]Introduce "account modifiers" mechanism

2007-08-20 Thread Avi Kivity
Laurent Vivier wrote: >> >> Where did CONFIG_GUEST_ACCOUNTING go? >> >> > > Lost in the sea ... > > Actually, I thought this modification is not enough expensive (in time and > space) to justify a CONFIG_*. But if you think so I can add this in > init/Kconfig. > > The difference between "

Re: [kvm-devel] [PATCH/RFC 3/4]Introduce "account modifiers" mechanism

2007-08-20 Thread Laurent Vivier
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 think it is okay to have the same limitation for guest time. >>> >>> >>

Re: [kvm-devel] [PATCH/RFC 3/4]Introduce "account modifiers" mechanism

2007-08-19 Thread Avi Kivity
Laurent Vivier wrote: >> So I think it is okay to have the same limitation for guest time. >> > > OK, so we can go back to my first patch. > Who can decide to introduce this into the kernel ? > The sched.c parts are best merged by Ingo, and I can carry the kvm parts. Alternatively, I can

Re: [kvm-devel] [PATCH/RFC 3/4]Introduce "account modifiers" mechanism

2007-08-19 Thread Avi Kivity
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 think it is okay to have the same limitation for guest time. >> >> > > So this is how it looks li

Re: [kvm-devel] [PATCH/RFC 3/4]Introduce "account modifiers" mechanism

2007-08-17 Thread Laurent Vivier
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

Re: [kvm-devel] [PATCH/RFC 3/4]Introduce "account modifiers" mechanism

2007-08-17 Thread Laurent Vivier
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 virtualization engine), and when in account_system_time() we have

Re: [kvm-devel] [PATCH/RFC 3/4]Introduce "account modifiers" mechanism

2007-08-17 Thread Avi Kivity
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 >>> virtualization engine), and when in account_system_time() we have cputime > >>> vtime we substrat

Re: [kvm-devel] [PATCH/RFC 3/4]Introduce "account modifiers" mechanism

2007-08-17 Thread Laurent Vivier
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 3, and add in task_struct a "ktime vtime" where we

Re: [kvm-devel] [PATCH/RFC 3/4]Introduce "account modifiers" mechanism

2007-08-17 Thread Rusty Russell
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 3, and add in task_struct a "ktime vtime" where we accumulate > guest time (by ca

Re: [kvm-devel] [PATCH/RFC 3/4]Introduce "account modifiers" mechanism

2007-08-17 Thread Laurent Vivier
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 >> is based on the "preempt_notifier". "account_syst

Re: [kvm-devel] [PATCH/RFC 3/4]Introduce "account modifiers" mechanism

2007-08-16 Thread Rusty Russell
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 > is based on the "preempt_notifier". "account_system_time()" and > "account_u

[kvm-devel] [PATCH/RFC 3/4]Introduce "account modifiers" mechanism

2007-08-16 Thread Laurent Vivier
[PATCH 3/3] introduce "account modifiers" mechanism in the kernel allowing a module to modify the collected accounting for a given task. This implementation is based on the "preempt_notifier". "account_system_time()" and "account_user_time()" can call functions registered by a module to modify the