public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Vivier <Laurent.Vivier@bull.net>
To: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Ingo Molnar <mingo@elte.hu>, linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [RESEND 2][PATCH 3/4] modify account_system_time() to update guest time in cpustat and task_struct
Date: Mon, 10 Sep 2007 18:01:34 +0200	[thread overview]
Message-ID: <46E56A5E.20209@bull.net> (raw)
In-Reply-To: <20070910085331.84dc1fb5.randy.dunlap@oracle.com>

[-- Attachment #1: Type: text/plain, Size: 1491 bytes --]

Randy Dunlap wrote:
> On Mon, 10 Sep 2007 16:12:58 +0200 Laurent Vivier wrote:
> 
>> [PATCH 3/4] modify account_system_time() to add cputime to cpustat->guest if we
>> are running a VCPU. We add this cputime to  cpustat->user instead of
>> cpustat->system because this part of KVM code is in fact user code although it
>> is executed in the kernel. We duplicate VCPU time between guest and user to
>> allow an unmodified "top(1)" to display correct value. A modified "top(1)" is
>> able to display good cpu user time and cpu guest time by subtracting cpu guest
>> time from cpu user time. Update "gtime" in task_struct accordingly.
>>
>> Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
> 
> 
> Hi,
> Please use kernel-doc notation here:
> (see Documentation/kernel-doc-nano-HOWTO.txt or source file examples
> or ask)
> 
> easy fix:
> 
>  /*
> + * Account guest cpu time to a process.
> 
> /**
>  * account_guest_time - Account guest cpu time to a process.
> 
> + * @p: the process that the cpu time gets accounted to
> + * @cputime: the cpu time spent in virtual machine since the last update
> + */
> +void account_guest_time(struct task_struct *p, cputime_t cputime)
> +{

thank you for the comment.

But I just made a cut&past of the comment of the function above.

Should I be consistent with the doc or with the source ?

Laurent
-- 
------------- Laurent.Vivier@bull.net  --------------
          "Software is hard" - Donald Knuth


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2007-09-10 16:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-10 14:12 [RESEND 2][PATCH 3/4] modify account_system_time() to update guest time in cpustat and task_struct Laurent Vivier
2007-09-10 15:53 ` Randy Dunlap
2007-09-10 16:01   ` Laurent Vivier [this message]
2007-09-10 16:13     ` Randy Dunlap

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=46E56A5E.20209@bull.net \
    --to=laurent.vivier@bull.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=randy.dunlap@oracle.com \
    /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