lkml.org 
[lkml]   [2011]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFD 4/9] Make total_forks per-cgroup
From
Date
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.



\
 
 \ /
  Last update: 2011-09-28 14:57    [W:0.164 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site