[lkml]   [2001]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] fs/devfs/base.c
Daniel Phillips writes:

> We'd better know the upper bound of interrupt allocations or we have an
> accident waiting to happen. How much of the kernel stack is reserved
> for interrupts?

Since interrupt handlers generally run with other interrupts enabled,
and only their own interrupt disabled, it seems to me that the bound
on how much stack space you need to leave for interrupt handlers
depends on how many different interrupts you have in the system. On a
large system there could easily be tens or even hundreds of active
devices, all with different IRQs. It would be possible (although
unlikely) for them to all to interrupt at just the right time to get
all their handlers stacked, and that could easily overflow the stack.

One solution would be to start running interrupt handlers with
interrupts disabled (__cli) when they are getting close to being too
deeply nested - it would not be hard to check the stack pointer and if
there is less than some defined amount of stack space left then we
don't do the __sti before calling the handler.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:54    [W:1.224 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site