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. >>> >>> >> >> So this is how it looks like. >> PATCH 1 and 2 are always a prerequisite. >> >> > >> + tmp = cputime_to_cputime64(cputime); >> + if (p->flags & PF_VCPU) { >> + p->utime = cputime_add(p->utime, cputime); >> + p->gtime = cputime_add(p->gtime, cputime); >> + >> + cpustat->guest = cputime64_add(cpustat->guest, tmp); >> + cpustat->user = cputime64_add(cpustat->user, tmp); >> + >> + p->flags &= ~PF_VCPU; >> + >> + return; >> + } >> + > > 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. Laurent -- ------------- [email protected] -------------- "Software is hard" - Donald Knuth
Attachment:
signature.asc
Description: OpenPGP digital signature
- Follow-Ups:
- References:
- [PATCH/RFC 3/4]Introduce "account modifiers" mechanism
- From: Laurent Vivier <[email protected]>
- Re: [PATCH/RFC 3/4]Introduce "account modifiers" mechanism
- From: Rusty Russell <[email protected]>
- Re: [PATCH/RFC 3/4]Introduce "account modifiers" mechanism
- From: Laurent Vivier <[email protected]>
- Re: [PATCH/RFC 3/4]Introduce "account modifiers" mechanism
- From: Rusty Russell <[email protected]>
- Re: [PATCH/RFC 3/4]Introduce "account modifiers" mechanism
- From: Laurent Vivier <[email protected]>
- Re: [kvm-devel] [PATCH/RFC 3/4]Introduce "account modifiers" mechanism
- From: Avi Kivity <[email protected]>
- Re: [kvm-devel] [PATCH/RFC 3/4]Introduce "account modifiers" mechanism
- From: Laurent Vivier <[email protected]>
- Re: [kvm-devel] [PATCH/RFC 3/4]Introduce "account modifiers" mechanism
- From: Avi Kivity <[email protected]>
- [PATCH/RFC 3/4]Introduce "account modifiers" mechanism
- Prev by Date: Re: Thinking outside the box on file systems
- Next by Date: Re: [PATCH 04/10] mm: slub: add knowledge of reserve pages
- Previous by thread: Re: [kvm-devel] [PATCH/RFC 3/4]Introduce "account modifiers" mechanism
- Next by thread: Re: [kvm-devel] [PATCH/RFC 3/4]Introduce "account modifiers" mechanism
- Index(es):