From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755772AbcA2Wnc (ORCPT ); Fri, 29 Jan 2016 17:43:32 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39544 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752651AbcA2Wna (ORCPT ); Fri, 29 Jan 2016 17:43:30 -0500 Subject: Re: [PATCH 2/2] sched,time: call __acct_update_integrals once a jiffy To: linux-kernel@vger.kernel.org References: <1454106180-20918-1-git-send-email-riel@redhat.com> <1454106180-20918-3-git-send-email-riel@redhat.com> Cc: tglx@linutronix.de, mingo@kernel.org, peterz@infradead.org, luto@amacapital.net, fweisbec@gmail.com, Clark Williams From: Rik van Riel Message-ID: <56ABEB10.5060307@redhat.com> Date: Fri, 29 Jan 2016 17:43:28 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1454106180-20918-3-git-send-email-riel@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/29/2016 05:23 PM, riel@redhat.com wrote: > From: Rik van Riel > This speeds up ... ok, that changelog got truncated :( Here is the full version: Because __acct_update_integrals does nothing unless the time interval in question exceeds a jiffy, there is no real reason to call it more than once a jiffy from the syscall, irq, and guest entry & exit paths. If tasks get rescheduled frequently, the scheduler will still update their time statistics normally. However, longer running tasks with frequent syscall, irq, or guest entry & exit see a difference with this patch. A microbenchmark calling an invalid syscall number 10 million times in a row speeds up an additional 30% over the numbers with just the previous patch, for a total speedup of about 40% over 4.4 and 4.5-rc1. Run times for the microbenchmark: 4.4 3.8 seconds 4.5-rc1 3.7 seconds 4.5-rc1 + first patch 3.3 seconds 4.5-rc1 + both patches 2.3 seconds -- All rights reversed