[RFC] Shrink sched_clock some more

Russell King - ARM Linux linux at arm.linux.org.uk
Fri Sep 23 16:44:07 EDT 2011


On Thu, Sep 22, 2011 at 02:16:59PM -0400, Nicolas Pitre wrote:
> On Thu, 22 Sep 2011, Russell King - ARM Linux wrote:
> 
> > ... by getting rid of the fixed-constant optimization, and moving the
> > update code into arch/arm/kernel/sched_clock.c.
> > 
> > Platforms now only have to supply a function to read the sched_clock
> > register, and some basic information such as the number of significant
> > bits and the tick rate.
> > 
> > Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
> 
> Nice.  Too bad for the fixed-constant optimization, but it wasn't used 
> enough to justify the bloat.

It's a shame to see it go - we _could_ work around that without making
anything worse over this code by merely making it an indirect call via
a common sched_clock() in arch/arm/kernel/sched_clock.c - iow:

unsigned long long notrace sched_clock(void)
{
	return real_sched_clock ? real_sched_clock() : 0ULL;
}

We have to have an indirection somewhere to allow the implementations of
the underlying timer to be switched.

However, as you say, there's not enough users of the fixed-constant stuff
to make it worth while keeping.



More information about the linux-arm-kernel mailing list