Re: [PATCH 0/2] itimers: periodic timers fixes

From: Stanislaw Gruszka
Date: Fri Apr 03 2009 - 09:07:36 EST


On Thu, 2 Apr 2009 18:57:53 +0200
Ingo Molnar <mingo@xxxxxxx> wrote:

> Converting those to GTOD sampling instead of jiffies sampling is a
> worthwile change IMO and a good concept.
>
> The unificaton of ITIMER_PROF and ITIMER_VIRT is a nice observation
> and a good patch.
>
> The second one, changing all the sampling from cputime to ktime_t is
> nicely done too:
>
> We could do more though, there's still a bit of cputime legacies
> around:
>
> + cputime_t cval, nval;
>
> Couldnt all of that go over into the ktime_t space as well, phasing
> out cputime logic from the itimer code?
>
> The user ABI is struct timeval based, so there's no need to have
> cputime anywhere. The scheduler does nanoseconds accurate stats so
> it can be connected up there too.

Removing cputime stuff from itimers has probably only sense when
utime, stime and related fields in task_struct would be represented
as ktime or u64 variable in nanoseconds accurate. This mean a lot of
work. I'm not sure if is worth to do in the meaning that as result we
get better (faster and perhaps smaller) code.

I was thinking about removing cputime as whole, make utime and stime
64 bit variables and account them in nanoseconds resolution. Remove
sum_exec_runtime from struct task_cputime and related CPUCLOCK_SCHED
code as duplicate of nanosecond accounted stime and CPUCLOCK_PROF code.
But that were too intrusive changes for me with unknown performance
impact.

My primary goal is to improve periodic itimers accuracy (see
https://bugzilla.redhat.com/show_bug.cgi?id=441134), these patches
are just enough to achieve the goal.

Cheers
Stanislaw Gruszka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/