[cgl_discussion] AEM calls to do_event()

Dave Olien dmo at osdl.org
Fri Mar 21 13:29:43 PST 2003

I'm looking at source code a little.

I notice that you call do_event() from the assembly code in entry.S
in the ret_from_sys_call: code path.  This catches all the cases
returning from kernel to user mode, either at the end of:

	an system call,
	an exception,
	an interrupt,
	context switch

and pretty much all other cases where the kernel is returning from
kernel to user mode.  This is very similar to signal delivery.

I notice you also have a call to do_event() on ENTRY to the
kernel at interrupt time.  In hw_irq.h, the BUILD_COMMON_IRQ() macro
now includes a call to do_event() in the assembly language prologue to
every interrupt handler.

This case seems unneeded.  It's adding to the interrupt handling
code path, and gets called before the interrupt handler itself,
so it increases interrupt latency.

You can't actually deliver an event until you return to user mode
anyway, correct?

What does this do_event() call accomplish that won't be done later anyway
in entry.S?

More information about the cgl_discussion mailing list