Re: [PATCH 0/4] new timeofday-based soft-timer subsystem

Nishanth Aravamudan
2005-06-14T18:11:21Z

On 13.06.2005 [20:46:55 -0700], Nishanth Aravamudan wrote:
> On 08.06.2005 [20:11:42 -0700], john stultz wrote:
> > Hey Everyone,
> > I'm heading out on vacation until Monday, so I'm just re-spinning my
> > current tree for testing. If there's no major issues on Monday, I'll re-
> > diff against Andrew's tree and re-submit the patches for inclusion.
>
> Here is an update of my soft-timer rework to John's latest patches. I
> have made some major changes in this revision. I would still greatly
> appreciate any comments.

First, one consideration I forgot:

Would it be beneficial to encapsulate the timer_list structure? That way
if the units change underneath and we eventually move to timer_fsecs
(for femtoseconds), we don't need to change all the callers of
set_timer_nsecs() again?

I'm envisioning something along the lines of:

init_and_set_timer_nsecs((void *)(function), unsigned long data, nsec_t
expires_nsecs);

I guess the trick then, is that a pointer to the created timer_list in
init_and_set_timer_nsecs() needs to be handed back to the caller, to
guarantee they can delete the timer if needed. Maybe that won't work :/

Just a thought, which might make this the hard transition, but should
make extensibility easier to handle.

<snip>

Also, some updates:

> [1] Benchmark Differentials on various machines

There was a bug in my ppc64 emulation (was just using jiffies not
(jiffies - INITIAL_JIFFIES)), here's is the update value for tod-timer:

> ppc64, 8-way 1.2GHz Power4, 12GB RAM
> Elapsed User System CPU
> 2.6.12-rc6 100% 100% 100% 100%
> 2.6.12-rc6-tod 95.59% 100.04% 101.28% 104.81%
2.6.12-rc6-tod-timer 97.53% 100.18% 100.75% 102.81%

Also, here are the differentials between 2.6.12-rc6 and
2.6.12-rc6-tod-timer with emulation of do_monotonic_clock() on NUMA-Q.

numaq, 16-way 700 MHz, PIII, 16GB RAM
Elapsed User System CPU
2.6.12-rc6 100% 100% 100% 100%
2.6.12-rc6-tod-timer 100.99% 98.1% 99.13% 98.02%

Thanks,
Nish