[uClinux-dev] Is linux supposed to service interrupts while executing syscalls?

Greg Ungerer gerg at snapgear.com
Thu Jan 4 10:08:53 EST 2007


Hi Chris,

chris m wrote:
> Hi,  I'm porting uclinux 2.4.19 (The Xiptech mipsnommu port) to a new
> mips-nommu platform.
> 
> In case you aren't familiar with Mips, the general interrupt/exception
> plumbing is as follows:  There is a top level exception vector that is
> called in any "regular" exception state, such as syscalls, data
> alignment faults, etc.   Also, interrupts are considered a particular
> type of exception.   So the dispatch code [the top-level exception
> vector] figures out if its a syscall exception, interrupt exception,
> etc.  and jumps to the appropriate handler.
> 
> While servicing an exception, interrupts are disabled.     My jiffy
> clock is driven by one of these interrupts.  So as the kernel stands
> now, I never reach my jiffy timer service routine while a process is
> executing a syscall.
> 
> This doesn't seem right.   The timer interrupts should still be active
> while performing a syscall, right, because some syscalls, such as a
> long read from a file, could take a very long time, and we'd want to
> be able to invoke the scheduler even if a process is in the middle of
> kernel code, executing a syscall.

That is right. If you look at the exception handling on any
other architecture you will see that interrupts are always
re-enabled somehwere soon into the syscall handling code.


> If you don't know the specifics of MIPS thats OK, I just want a
> conceptual understanding of how its Supposed to be.

Regards
Greg


------------------------------------------------------------------------
Greg Ungerer  --  Chief Software Dude       EMAIL:     gerg at snapgear.com
SnapGear -- a Secure Computing Company      PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com


More information about the uClinux-dev mailing list