Re: do_softirq() newbie question...

From: Manfred Spraul (manfred@colorfullife.com)
Date: Tue Jun 13 2000 - 13:39:21 EST


"J. Robert von Behren" wrote:
>
> I'm probably showing my naivette as a C hacker, but why the gotos
> instead of just inline functions?
>

Use the asm source ;-) [objdump --disassemble-all, or within gdb]

        if(contition)
                goto label;

is compiled into

        cmpl ; compare the contition
        je label ; goto label

Thus in the default case to processor can run through schedule() without
jumping around.

The asm code is also the answer to your do_softirq question: do_softirq
reenables the interrupt processing, and the kernel profiler uses
interrupts --> you see lots of hits on

        local_irq_enable();

IIRC some tools can profile areas that run with disabled interrupts, but
I never used them.

--
	Manfred

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jun 15 2000 - 21:00:29 EST