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


Groups > linux.kernel > #1460976

Re: [PATCH] time,virt: resync steal time when guest & host lose sync

From Wanpeng Li <kernellwp@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] time,virt: resync steal time when guest & host lose sync
Date 2016-08-12 09:10 +0200
Message-ID <s5eLo-6Xs-7@gated-at.bofh.it> (permalink)
References (4 earlier) <s4oD8-5EB-49@gated-at.bofh.it> <s4oMO-5I4-21@gated-at.bofh.it> <s4G70-8uN-67@gated-at.bofh.it> <s4VfH-2u4-17@gated-at.bofh.it> <s5aHL-4bR-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


2016-08-12 10:44 GMT+08:00 Rik van Riel <riel@redhat.com>:
> On Thu, 2016-08-11 at 18:11 +0800, Wanpeng Li wrote:
>> 2016-08-11 0:52 GMT+08:00 Rik van Riel <riel@redhat.com>:
>> > On Wed, 10 Aug 2016 07:39:08 +0800
>> > Wanpeng Li <kernellwp@gmail.com> wrote:
>> >
>> > > The regression is caused by your commit "sched,time: Count
>> > > actually
>> > > elapsed irq & softirq time".
>> >
>> > Wanpeng, does this patch fix your issue?
>>
>> I test this against kvm guest (nohz_full, four vCPUs running on one
>> pCPU, four cpuhog processes running on four vCPUs).
>> before this fix patch:
>> vCPU0's st is 100%, other vCPUs' st are ~75%.
>> after this fix patch:
>> all vCPUs' st are ~85%.
>> However, w/o commit "sched,time: Count actually elapsed irq & softirq
>> time", all vCPUs' st are ~75%.
>
> If you pass ULONG_MAX as the maxtime argument to
> steal_account_process_time(), does the steal time
> get accounted properly at 75%?

Yes.

>
> If that is the case, I have a hypothesis:
> 1) The guest is running so much slower when sharing
>    a CPU 4 ways, that it is accounting only ~90% of
>    wall clock time as CPU time, due to missing the
>    other 10% or so of clock ticks.
> 2) account_process_tick() only ever processes one tick
>    at a time - if it gets called only 90x a second for
>    a 100Hz guest, but all the steal time recorded by
>    the host is fully accounted (ULONG_MAX limit), then
>    that could make up for lost/skipped timer ticks.
> 3) not accounting "extra" steal time (beyond the amount
>    of time accounted by account_process_tick) would reduce
>    the total amount of time that gets accounted if there
>    are missed ticks, taking time away from user/system/etc
>
> Does the above make sense?
>
> Am I overlooking some mechanism through which lost/skipped
> ticks are made up for in the kernel?  I looked through the
> code in kernel/time/ briefly, but did not spot it...
>
> --
>
> All Rights Reversed.

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


Thread

Re: [PATCH] time,virt: resync steal time when guest & host lose sync Wanpeng Li <kernellwp@gmail.com> - 2016-08-11 12:20 +0200
  Re: [PATCH] time,virt: resync steal time when guest & host lose sync Rik van Riel <riel@redhat.com> - 2016-08-12 04:50 +0200
    Re: [PATCH] time,virt: resync steal time when guest & host lose sync Wanpeng Li <kernellwp@gmail.com> - 2016-08-12 09:10 +0200
      Re: [PATCH] time,virt: resync steal time when guest & host lose  sync Rik van Riel <riel@redhat.com> - 2016-08-12 18:00 +0200
        Re: [PATCH] time,virt: resync steal time when guest & host lose sync Frederic Weisbecker <fweisbec@gmail.com> - 2016-08-13 17:40 +0200
        Re: [PATCH] time,virt: resync steal time when guest & host lose sync Wanpeng Li <kernellwp@gmail.com> - 2016-08-15 11:00 +0200
          Re: [PATCH] time,virt: resync steal time when guest & host lose sync Wanpeng Li <kernellwp@gmail.com> - 2016-08-15 13:40 +0200
          Re: [PATCH] time,virt: resync steal time when guest & host lose sync Rik van Riel <riel@redhat.com> - 2016-08-15 17:10 +0200
            Re: [PATCH] time,virt: resync steal time when guest & host lose sync Wanpeng Li <kernellwp@gmail.com> - 2016-08-16 00:20 +0200
            Re: [PATCH] time,virt: resync steal time when guest & host lose sync Wanpeng Li <kernellwp@gmail.com> - 2016-08-16 03:40 +0200
              Re: [PATCH] time,virt: resync steal time when guest & host lose sync Rik van Riel <riel@redhat.com> - 2016-08-16 04:20 +0200
                Re: [PATCH] time,virt: resync steal time when guest & host lose sync Wanpeng Li <kernellwp@gmail.com> - 2016-08-16 09:00 +0200
                Re: [PATCH] time,virt: resync steal time when guest & host lose sync Rik van Riel <riel@redhat.com> - 2016-08-16 16:20 +0200
                Re: [PATCH] time,virt: resync steal time when guest & host lose sync Wanpeng Li <kernellwp@gmail.com> - 2016-08-17 01:10 +0200

csiph-web