From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rik van Riel Subject: Re: [RFC v2 4/7] change kernel accounting to include steal time Date: Mon, 30 Aug 2010 15:17:31 -0400 Message-ID: <4C7C03CB.1060700@redhat.com> References: <1283184391-7785-1-git-send-email-glommer@redhat.com> <1283184391-7785-2-git-send-email-glommer@redhat.com> <1283184391-7785-3-git-send-email-glommer@redhat.com> <1283184391-7785-4-git-send-email-glommer@redhat.com> <1283184391-7785-5-git-send-email-glommer@redhat.com> <1283184391-7785-6-git-send-email-glommer@redhat.com> <1283184391-7785-7-git-send-email-glommer@redhat.com> <1283184391-7785-8-git-send-email-glommer@redhat.com> <4C7BEA9C.1060605@goop.org> <4C7BFACD.4030409@redhat.com> <4C7C0187.7040401@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Glauber Costa , kvm@vger.kernel.org, avi@redhat.com, zamsden@redhat.com, mtosatti@redhat.com, peterz@infradead.org, mingo@elte.hu To: Jeremy Fitzhardinge Return-path: Received: from mx1.redhat.com ([209.132.183.28]:46653 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751787Ab0H3TRn (ORCPT ); Mon, 30 Aug 2010 15:17:43 -0400 In-Reply-To: <4C7C0187.7040401@goop.org> Sender: kvm-owner@vger.kernel.org List-ID: On 08/30/2010 03:07 PM, Jeremy Fitzhardinge wrote: > On 08/30/2010 11:39 AM, Rik van Riel wrote: >> On 08/30/2010 01:30 PM, Jeremy Fitzhardinge wrote: >>> On 08/30/2010 09:06 AM, Glauber Costa wrote: >>>> This patch proposes a common steal time implementation. When no >>>> steal time is accounted, we just add a branch to the current >>>> accounting code, that shouldn't add much overhead. >>> >>> How is stolen time logically any different from a CPU running slowly due >>> to HT or power management? Is it worth trying to handle them in the >>> same way? (I'm mostly picking on the "_from_hypervisor" part, since >>> that seems over-specific.) >>> >>> Why not have a get_unstolen_time() function which just returns >>> sched_clock() in the normal case, but can return less? >> >> Steal time gets you information you can act on, when >> your program is running slowly. >> >> The steal time statistic allows you to see whether the >> slowdown was due to the CPU just not being fast enough, >> or due to something else contending for the CPU. >> >> This can be useful information. Apparently, it has been >> useful enough that it has been implemented on s390, PPC >> and Xen (pre pvops Xen). > > Sure - pvops Xen has had stolen time accounting from the start (or a > very long time, at least). I think Glauber's changes are functionally > identical to Xen's existing stolen time support, but more intrusive. > > >> I suppose HT can have similar results, but that is >> also something that system administrators can see. > > My comments were mostly because I though that this patch was going to > actually make the scheduler change behaviour to take stolen time into > account in scheduling decisions I believe that happens automatically. When time is accounted as steal time, it is NOT accounted as to the current process user/system/..., which in turn should help it in the scheduler. Am I overlooking something? -- All rights reversed