[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
    On 09/28/2011 05:13 AM, Martin Schwidefsky wrote:
    > On Wed, 28 Sep 2011 00:00:37 +0200
    > Peter Zijlstra<> wrote:
    >> On Fri, 2011-09-23 at 19:20 -0300, Glauber Costa wrote:
    >>> @@ -1039,6 +1035,8 @@ static void posix_cpu_timers_init(struct task_struct *tsk)
    >>> INIT_LIST_HEAD(&tsk->cpu_timers[2]);
    >>> }
    >>> +struct task_group *task_group(struct task_struct *p);
    >> That doesn't appear to be actually used in this file..
    >> Also, since there's already a for_each_possible_cpu() loop in that
    >> proc/stat function, would it yield some code improvement to make
    >> total_forks a cpu_usage_stat?
    >> I guess the whole cputime64_t crap gets in the way of that being
    >> natural...
    >> We could of course kill off the cputime64_t thing, its pretty pointless
    >> and its a u64 all over the board. I think Martin or Heiko created this
    >> stuff (although I might be wrong, my git tree doesn't go back that far).
    > The reason to introduce cputime_t has been that different architecture
    > needed differently sized integers for their respective representation
    > of cputime. On x86-32 the number of ticks is recorded in a u32, on s390
    > we needed a u64 for the cpu timer values. cputime64_t is needed for
    > cpustat and other sums of cputime that would overflow a cputime_t
    > (in particular on x86-32 with the u32 cputime_t and the u64 cputime64_t).
    > Now we would convert everything to u64 but that would cause x86-32 to
    > use 64-bit arithmetic for the tick counter. If that is acceptable I
    > can't say.
    If we get rid of cputime64_t, it doesn't mean we need to get rid of
    cputime_t. Or am I missing the point here?

    We would still have to call an analogous of cputime_to_cputime64 before
    using it, but I get that where it matters, gcc can even make it void.
    And for all the rest, we do u64 math and typing and just get happy.

     \ /
      Last update: 2011-09-28 17:29    [W:0.024 / U:0.068 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site