Andreas Mohr
93ad4fb04f
[PATCH] pcnet_cs.c: IRQ handler optimization
...
During some performance diagnostics I stumbled on this slightly wasteful
code in pcnet_cs.c which I made the patch included at the bottom for (two
minor comment fixes included).
Improvement:
instead of *always* calculating
lea 0x2c0(%edx),%ebx
and then additionally doing the
mov %edx,0xc0(%ebx)
addition *if we need it*,
we now do the *whole* calculation of
mov %edx,0x380(%ebx)
*only* if we need it.
This even manages to save us a whole 16-byte alignment buffer loss
in this compilation case.
Result: slightly improves IRQ handler performance in both shared and
non-shared IRQ case, which should make my rusty P3/700 a slight bit happier.
Thank you for your support,
Andreas Mohr
old asm result (using gcc 3.3.5):
000015a0 <ei_irq_wrapper>:
15a0: 55 push %ebp
15a1: 89 e5 mov %esp,%ebp
15a3: 53 push %ebx
15a4: 8d 9a c0 02 00 00 lea 0x2c0(%edx),%ebx
15aa: e8 fc ff ff ff call 15ab <ei_irq_wrapper+0xb>
15af: 83 f8 01 cmp $0x1,%eax
15b2: 74 03 je 15b7 <ei_irq_wrapper+0x17>
15b4: 5b pop %ebx
15b5: 5d pop %ebp
15b6: c3 ret
15b7: 31 d2 xor %edx,%edx
15b9: 89 93 c0 00 00 00 mov %edx,0xc0(%ebx)
15bf: eb f3 jmp 15b4 <ei_irq_wrapper+0x14>
15c1: eb 0d jmp 15d0 <ei_watchdog>
15c3: 90 nop
15c4: 90 nop
15c5: 90 nop
15c6: 90 nop
15c7: 90 nop
15c8: 90 nop
15c9: 90 nop
15ca: 90 nop
15cb: 90 nop
15cc: 90 nop
15cd: 90 nop
15ce: 90 nop
15cf: 90 nop
000015d0 <ei_watchdog>:
new asm result:
000015a0 <ei_irq_wrapper>:
15a0: 55 push %ebp
15a1: 89 e5 mov %esp,%ebp
15a3: 53 push %ebx
15a4: 89 d3 mov %edx,%ebx
15a6: e8 fc ff ff ff call 15a7 <ei_irq_wrapper+0x7>
15ab: 83 f8 01 cmp $0x1,%eax
15ae: 74 03 je 15b3 <ei_irq_wrapper+0x13>
15b0: 5b pop %ebx
15b1: 5d pop %ebp
15b2: c3 ret
15b3: 31 d2 xor %edx,%edx
15b5: 89 93 80 03 00 00 mov %edx,0x380(%ebx)
15bb: eb f3 jmp 15b0 <ei_irq_wrapper+0x10>
15bd: 8d 76 00 lea 0x0(%esi),%esi
000015c0 <ei_watchdog>:
Signed-off-by: Andrew Morton <akpm@osdl.org >
2005-06-26 18:24:00 -04:00
..
2005-06-22 22:19:52 -07:00
2005-05-05 16:36:47 -07:00
2005-05-15 22:21:07 -04:00
2005-06-26 17:54:11 -04:00
2005-04-16 15:20:36 -07:00
2005-06-23 03:41:00 -04:00
2005-04-16 15:20:36 -07:00
2005-06-23 09:45:36 -07:00
2005-05-15 22:44:26 -04:00
2005-06-25 17:10:13 -07:00
2005-06-26 17:11:03 -04:00
2005-06-26 18:24:00 -04:00
2005-06-26 18:22:14 -04:00
2005-05-15 18:54:49 -04:00
2005-06-26 18:22:14 -04:00
2005-06-26 17:45:52 -04:00
2005-06-26 18:22:14 -04:00
2005-06-26 18:16:13 -04:00
2005-06-21 18:46:22 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-05-12 20:11:55 -04:00
2005-04-16 15:20:36 -07:00
2005-05-12 22:21:51 -04:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-05-12 20:11:55 -04:00
2005-05-12 20:11:55 -04:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-06-26 18:02:44 -04:00
2005-06-25 17:10:13 -07:00
2005-06-21 19:07:31 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-05-12 20:11:55 -04:00
2005-04-16 15:20:36 -07:00
2005-06-26 18:22:14 -04:00
2005-04-16 15:20:36 -07:00
2005-05-12 19:40:38 -04:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-05-12 19:45:25 -04:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-05-12 19:45:25 -04:00
2005-04-16 15:20:36 -07:00
2005-05-26 13:03:09 -07:00
2005-05-26 13:03:09 -07:00
2005-05-26 13:03:09 -07:00
2005-04-16 15:20:36 -07:00
2005-05-12 20:11:55 -04:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-05-15 18:31:07 -04:00
2005-05-15 18:31:07 -04:00
2005-04-16 15:20:36 -07:00
2005-06-26 18:22:14 -04:00
2005-05-12 20:11:55 -04:00
2005-04-16 15:20:36 -07:00
2005-05-12 20:11:55 -04:00
2005-05-12 20:11:55 -04:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-05-12 20:11:55 -04:00
2005-05-12 20:11:55 -04:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-05-15 18:10:01 -04:00
2005-04-16 15:20:36 -07:00
2005-06-26 17:58:51 -04:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-05-01 08:59:09 -07:00
2005-04-16 15:20:36 -07:00
2005-06-26 18:22:14 -04:00
2005-04-16 15:20:36 -07:00
2005-05-12 20:11:55 -04:00
2005-05-12 20:11:55 -04:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-05-12 20:11:55 -04:00
2005-06-09 15:39:52 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-06-04 17:54:39 -04:00
2005-05-12 20:11:55 -04:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-05-12 20:11:55 -04:00
2005-05-05 16:36:49 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-06-04 17:54:39 -04:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-25 07:55:58 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-05-12 22:22:36 -04:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-05-15 18:18:56 -04:00
2005-05-12 20:11:55 -04:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-05-12 20:11:55 -04:00
2005-05-12 20:11:55 -04:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-06-26 18:22:14 -04:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:25:25 -07:00
2005-05-15 18:22:29 -04:00
2005-04-16 15:20:36 -07:00
2005-06-23 09:45:36 -07:00
2005-05-03 14:38:09 -07:00
2005-06-20 15:15:09 -07:00
2005-06-23 09:45:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-06-18 11:42:35 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-06-26 18:22:14 -04:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-06-02 16:36:00 -07:00
2005-06-26 18:14:31 -04:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-05-15 22:19:48 -04:00
2005-05-12 20:14:36 -04:00
2005-04-16 15:20:36 -07:00
2005-06-23 21:06:56 -07:00
2005-04-16 15:20:36 -07:00
2005-05-27 22:21:16 -04:00
2005-05-27 22:21:16 -04:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-05-12 22:24:39 -04:00
2005-04-16 15:20:36 -07:00
2005-05-12 20:11:55 -04:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-05-12 22:27:35 -04:00
2005-05-12 20:16:24 -04:00
2005-04-16 15:20:36 -07:00
2005-05-12 20:16:24 -04:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-24 20:35:20 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-06-26 18:22:14 -04:00
2005-04-16 15:20:36 -07:00
2005-04-24 20:35:20 -07:00
2005-04-16 15:20:36 -07:00
2005-04-24 20:35:20 -07:00
2005-04-24 20:35:20 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-06-24 20:21:01 -07:00
2005-06-24 20:18:35 -07:00
2005-06-26 18:22:14 -04:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:25:25 -07:00
2005-04-16 15:20:36 -07:00
2005-06-26 18:22:14 -04:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-05-12 20:11:55 -04:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00