From: Paolo Bonzini <pbonzini@redhat.com>
To: Wanpeng Li <kernellwp@gmail.com>
Cc: "Wanpeng Li" <wanpeng.li@hotmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"Ingo Molnar" <mingo@kernel.org>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
"Rik van Riel" <riel@redhat.com>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Frederic Weisbecker" <fweisbec@gmail.com>,
"Radim Krčmář" <rkrcmar@redhat.com>
Subject: Re: [PATCH v4 3/3] sched/cputime: Add steal time support to full dynticks CPU time accounting
Date: Tue, 7 Jun 2016 14:34:36 +0200 [thread overview]
Message-ID: <7b182c01-5d17-d73a-1906-3f7155b4236c@redhat.com> (raw)
In-Reply-To: <CANRm+Cx7NRP4eTa3uJQsCqOhoVF9G+RVu9QZRhf6_6gwGq41DA@mail.gmail.com>
On 07/06/2016 14:15, Wanpeng Li wrote:
>> >
>> > You're adding almost the same code to two callers of get_vtime_delta out
>> > of three. I don't know the vtime accounting code very well, but why
>> > doesn't the same apply to account_idle_time?
> St stuff is accounted when vCPUs(tasks on host) are enqueued in rb
> trees of pCPUs, which means that they are ready to run until they
> finially reach CPUs. However, when vCPUs are idle, they will be
> dequeued from rb trees and the time will be not accounted as st.
Why not? If idle=poll, for example, any time the guest is suspended
(and thus cannot poll) does count as stolen time.
In addition, you are going to account the stolen time anyway sooner or
later, and then it will be accounted wrong (subtracted to either user or
system time). I really believe you should do the change directly in
get_vtime_delta.
Paolo
>> > If it does, you should instead change get_vtime_delta to process steal
>> > time and subtract it from the result.
>> >
>> > Secondarily, when can it happen that steal_time > delta_time?
> Rik explanation it when he reply to v1.
> http://www.gossamer-threads.com/lists/linux/kernel/2441175?do=post_view_threaded#2441175
next prev parent reply other threads:[~2016-06-07 12:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1465661590-4732-1-git-send-email-wanpeng.li@hotmail.com>
[not found] ` <SG2PR02MB15507073C531BAA82E9C8E67805D0@SG2PR02MB1550.apcprd02.prod.outlook.com>
2016-06-07 10:34 ` [PATCH v4 2/3] sched/cputime: Fix prev steal time accouting during cpu hotplug Paolo Bonzini
[not found] ` <SG2PR02MB15505ACED7653E515DE21620805D0@SG2PR02MB1550.apcprd02.prod.outlook.com>
2016-06-07 11:50 ` Fw: " Wanpeng Li
2016-06-07 11:53 ` Paolo Bonzini
[not found] ` <SG2PR02MB15501BB06CAE47E4406FF7AD805D0@SG2PR02MB1550.apcprd02.prod.outlook.com>
2016-06-07 10:47 ` [PATCH v4 3/3] sched/cputime: Add steal time support to full dynticks CPU time accounting Paolo Bonzini
2016-06-07 11:23 ` Wanpeng Li
2016-06-07 12:15 ` Wanpeng Li
2016-06-07 12:34 ` Paolo Bonzini [this message]
2016-06-07 8:33 [PATCH v4 1/3] KVM: fix steal clock warp during guest cpu hotplug Wanpeng Li
2016-06-07 8:33 ` [PATCH v4 3/3] sched/cputime: Add steal time support to full dynticks CPU time accounting Wanpeng Li
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=7b182c01-5d17-d73a-1906-3f7155b4236c@redhat.com \
--to=pbonzini@redhat.com \
--cc=fweisbec@gmail.com \
--cc=kernellwp@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=riel@redhat.com \
--cc=rkrcmar@redhat.com \
--cc=tglx@linutronix.de \
--cc=wanpeng.li@hotmail.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
all inboxes | Powered by JetHome®