From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754867Ab1I1Pa4 (ORCPT ); Wed, 28 Sep 2011 11:30:56 -0400 Received: from mx2.parallels.com ([64.131.90.16]:53338 "EHLO mx2.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752091Ab1I1Paz (ORCPT ); Wed, 28 Sep 2011 11:30:55 -0400 Message-ID: <4E833D6D.1030407@parallels.com> Date: Wed, 28 Sep 2011 12:29:49 -0300 From: Glauber Costa User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0.2) Gecko/20110906 Thunderbird/6.0.2 MIME-Version: 1.0 To: Peter Zijlstra CC: Martin Schwidefsky , , , , , , Heiko Carstens Subject: Re: [RFD 4/9] Make total_forks per-cgroup References: <1316816432-9237-1-git-send-email-glommer@parallels.com> <1316816432-9237-5-git-send-email-glommer@parallels.com> <1317160837.21836.21.camel@twins> <20110928101357.5a90c2ab@de.ibm.com> <1317206124.20318.6.camel@twins> <20110928144218.6a4882e5@de.ibm.com> <1317214418.24040.13.camel@twins> In-Reply-To: <1317214418.24040.13.camel@twins> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [187.46.219.221] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/28/2011 09:53 AM, Peter Zijlstra wrote: > On Wed, 2011-09-28 at 14:42 +0200, Martin Schwidefsky wrote: > >>> That is, am I missing some added value of all this cputime*() foo? >> >> C can do the math as long as the encoding of the cputime is simple enough. >> Can we demand that a cputime value needs to be an integral type ? > > I'd like to think we can ;-) > >> What I did when I wrote all that stuff is to define cputime_t as a struct >> that contains a single u64. That way I found all the places in the kernel >> that used a cputime and could convert the code accordingly. > > Indeed, that makes it a non-simple type and breaks all the C arith bits. > >> My fear is that if the cputime_xxx operations are removed, code will >> sneak in again that just uses an unsigned long instead of a cputime_t. >> That would break any arch that requires something bigger than a u32 for >> its cputime. > > Which is only a problem for 32bit archs, of which s390 is the only one > that matters, right? Hurm,. could we do something with sparse? Lots of > people run sparse. > Well, I think x86-32 is unlikely to ever really go away.