From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756572AbcA3Dgl (ORCPT ); Fri, 29 Jan 2016 22:36:41 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35261 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756454AbcA3Dgh (ORCPT ); Fri, 29 Jan 2016 22:36:37 -0500 Date: Sat, 30 Jan 2016 04:36:34 +0100 From: Frederic Weisbecker To: Peter Zijlstra Cc: riel@redhat.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@kernel.org, luto@amacapital.net Subject: Re: [PATCH 1/2] sched,time: remove pointless divides from __acct_update_integrals Message-ID: <20160130033632.GA14020@lerouge> References: <1454106180-20918-1-git-send-email-riel@redhat.com> <1454106180-20918-2-git-send-email-riel@redhat.com> <20160129231018.GK6357@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160129231018.GK6357@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 30, 2016 at 12:10:18AM +0100, Peter Zijlstra wrote: > On Fri, Jan 29, 2016 at 05:22:59PM -0500, riel@redhat.com wrote: > > From: Rik van Riel > > > > When running a microbenchmark calling an invalid syscall number > > in a loop, on a nohz_full CPU, we spend a full 9% of our CPU > > time in __acct_update_integrals. > > > > This function converts cputime_t to jiffies, to a timeval, only to > > convert the timeval back to microseconds before discarding it. > > > > This patch leaves __acct_update_integrals functionally equivalent, > > but speeds things up by about 11%, with 10 million calls to an > > invalid syscall number dropping from 3.7 to 3.3 seconds. > > WTH is this taskstat crap anyway? Who uses it and can't we kill it? I have no idea what it's used for, it seems to be related to taskstats over netlink. I'm not even sure if it's actually used. There don't seem to be a runtime offcase and I bet distros enable it. So that stuff does some work every millisecond on millions of machines while it probably has very few users. SGI introduced it in 2006 and it seems that their last contribution there is in 2008. The rest is kernel maintainance and fixes. If there are still users of it, then at least we should disable it on runtime by default.