diff -Napur -X /home/jbarnes/dontdiff linux-2.6.18/arch/x86_64/kernel/entry.S linux-2.6.18-slow/arch/x86_64/kernel/entry.S --- linux-2.6.18/arch/x86_64/kernel/entry.S 2006-09-19 20:42:06.000000000 -0700 +++ linux-2.6.18-slow/arch/x86_64/kernel/entry.S 2007-03-15 09:39:27.000000000 -0800 @@ -218,6 +218,8 @@ ENTRY(system_call) testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP),threadinfo_flags(%rcx) CFI_REMEMBER_STATE jnz tracesys +// jmp syscall_delay_hack +ret_from_delay: cmpq $__NR_syscall_max,%rax ja badsys movq %r10,%rcx @@ -289,6 +291,14 @@ sysret_signal: badsys: movq $-ENOSYS,RAX-ARGOFFSET(%rsp) jmp ret_from_sys_call +#if 0 +syscall_delay_hack: + SAVE_REST + call syscall_delay + LOAD_ARGS ARGOFFSET /* reload args from stack in case ptrace changed it */ + RESTORE_REST + jmp ret_from_delay +#endif /* Do syscall tracing */ tracesys: diff -Napur -X /home/jbarnes/dontdiff linux-2.6.18/arch/x86_64/kernel/irq.c linux-2.6.18-slow/arch/x86_64/kernel/irq.c --- linux-2.6.18/arch/x86_64/kernel/irq.c 2006-09-19 20:42:06.000000000 -0700 +++ linux-2.6.18-slow/arch/x86_64/kernel/irq.c 2007-03-15 09:36:27.000000000 -0800 @@ -108,6 +108,16 @@ skip: return 0; } +static int irq_delay; + +static int __init irq_delay_hack(char *str) +{ + irq_delay = simple_strtol(str, NULL, 0); + return 1; +} +__setup("irq_delay=", irq_delay_hack); + + /* * do_IRQ handles all normal device IRQ's (the special * SMP cross-CPU interrupts have their own specific @@ -124,6 +134,9 @@ asmlinkage unsigned int do_IRQ(struct pt BUG(); } + /* IRQ delay hack to measure performance hit */ + ndelay(irq_delay); + exit_idle(); irq_enter(); #ifdef CONFIG_DEBUG_STACKOVERFLOW