Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756644Ab2FOMNc (ORCPT ); Fri, 15 Jun 2012 08:13:32 -0400 Received: from mail-wg0-f44.google.com ([74.125.82.44]:47393 "EHLO mail-wg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753147Ab2FOMNa (ORCPT ); Fri, 15 Jun 2012 08:13:30 -0400 Date: Fri, 15 Jun 2012 14:13:25 +0200 From: Ingo Molnar To: Frederic Weisbecker Cc: Martin Schwidefsky , Thomas Gleixner , Peter Zijlstra , LKML , Alessio Igor Bogani , Andrew Morton , Avi Kivity , Chris Metcalf , Christoph Lameter , Daniel Lezcano , Geoff Levand , Gilad Ben Yossef , Hakan Akkan , Kevin Hilman , Max Krasnyansky , "Paul E. McKenney" , Stephen Hemminger , Steven Rostedt , Sven-Thorsten Dietrich , Benjamin Herrenschmidt , "Luck,Tony" Subject: Re: [RFC GIT PULL] nohz: Basic cputime accounting for adaptive tickless Message-ID: <20120615121325.GC28541@gmail.com> References: <1339604397-8758-1-git-send-email-fweisbec@gmail.com> <1339664829.2559.14.camel@twins> <20120614111241.GA16848@somewhere> <20120614111638.GA16676@gmail.com> <20120614112241.GB16848@somewhere> <20120614144815.1401af49@de.ibm.com> <20120614130425.GC16848@somewhere> <20120614143633.GA32094@gmail.com> <20120614173453.GA20071@somewhere.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120614173453.GA20071@somewhere.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1985 Lines: 51 * Frederic Weisbecker wrote: > On Thu, Jun 14, 2012 at 04:36:33PM +0200, Ingo Molnar wrote: > > > > * Frederic Weisbecker wrote: > > > > > > > > > > I'll try something with that. > > > > > > > > > > > > > > Maybe sanitize all the variants under a single set of > > > > > > > wrappers/callbacks? > > > > > > > > > > > > Yes, please! > > > > > > > > > > Sure, I'm working in it. > > > > > > > > Please keep me in the loop, I want to avoid that things > > > > break on s390. Thanks. > > > > > > Well, I realize I can't consolidate much between ia64, s390 > > > and ppc because they all handle virtual cpu time accounting > > > very differently. I'm also not what the virtual timer is for. > > > > As a first step I'd suggest to create a superset of all existing > > and relied-upon wrappers/callbacks, into a single obvious > > sched_*() or time_*() namespace, without breaking functionality. > > But the API is already well defined. The arch just need to > implement account_system_vtime() and account_process_tick() > and record the time on the kernel boundaries. This is pretty > well contained in ppc entry.S where it is implemented through > ACCOUNT_CPU_USER_ENTRY/EXIT macros (although I see the time > accounted on syscall boundaries but not in exceptions), it's > more complicated in ia64 as the virt accounting is spread here > and there in entry.S and it's always on in s390. > > May be we could standardize a bit the way we save and account > the time. This require some non-trivial asm surgery on archs I > don't know much about though. Yeah, account_*() is a fine API too - as long as it's a unification of all time accounting functionality. Thanks, Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/