Subject: Re: [PATCH] FRV: do_gettimeofday() should no longer use tickadj

From: David Howells <[email-masked]>
Date: Mon, 11 Sep 2006 11:46:44 +0100

Ingo Molnar <[email-masked]> wrote:

> i cannot find Thomas' recent 2.6 one (Thomas, do you have a link to 
> it?), but i did one 5 years ago:
> 
>  http://people.redhat.com/mingo/irq-rewrite-patches/irq-cleanup-2.4.15-B1.bz2
> 
> in general it's a large but otherwise pretty dumb patch.

I wrote my own patch to test this last Friday.  I found that removing all the
regs pointer passing from the interrupt code reduced interrupt entry with a
warm cache by 1 cpu cycle out of 87, and interrupt exit by 19 cycles out of 99.

I can't tell from that exactly how many instructions/memory accesses have been
removed since the FRV permits two instructions to be executed in one cycle
under some circumstances, and two registers to be stored/loaded in one
instruction.

But the main gain in the exit path has to be due to recovery of the clobbered
regs parameter due to a call inside a loop, possibly in handle_IRQ_event().

I'd expect i386 to do better in cycle reduction because it has fewer registers
and so getting one back should gain more.

David