Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1416126

Re: [PATCH v4 3/3] sched/cputime: Add steal time support to full dynticks CPU time accounting

From Paolo Bonzini <pbonzini@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v4 3/3] sched/cputime: Add steal time support to full dynticks CPU time accounting
Date 2016-06-07 14:40 +0200
Message-ID <rHosx-2GV-23@gated-at.bofh.it> (permalink)
References <rHmAp-1vx-31@gated-at.bofh.it> <rHmK6-1z7-23@gated-at.bofh.it> <rHmK6-1z7-21@gated-at.bofh.it> <rHo9c-2Ai-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH v4 3/3] sched/cputime: Add steal time support to full  dynticks CPU time accounting Paolo Bonzini <pbonzini@redhat.com> - 2016-06-07 12:50 +0200
  Re: [PATCH v4 3/3] sched/cputime: Add steal time support to full  dynticks CPU time accounting Wanpeng Li <kernellwp@gmail.com> - 2016-06-07 13:30 +0200
  Re: [PATCH v4 3/3] sched/cputime: Add steal time support to full  dynticks CPU time accounting Wanpeng Li <kernellwp@gmail.com> - 2016-06-07 14:20 +0200
    Re: [PATCH v4 3/3] sched/cputime: Add steal time support to full  dynticks CPU time accounting Paolo Bonzini <pbonzini@redhat.com> - 2016-06-07 14:40 +0200

csiph-web