From: Brian Gerst <bgerst@didntduck.org>
To: Terence Ripperda <tripperda@nvidia.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: question about do_IRQ + 4k stacks
Date: Wed, 30 Mar 2005 21:14:22 -0500 [thread overview]
Message-ID: <424B5CFE.6010907@didntduck.org> (raw)
In-Reply-To: <20050330221042.GZ2104@hygelac>
Terence Ripperda wrote:
> I'm investigating some 4k stack issues with our driver, and I noticed
> this ordering in do_IRQ:
>
> asmlinkage unsigned int do_IRQ(struct pt_regs regs)
> {
> ...
>
> #ifdef CONFIG_DEBUG_STACKOVERFLOW
> /* Debugging check for stack overflow: is there less than 1KB free? */
> {
> ...
> }
> #endif
>
> ...
>
> #ifdef CONFIG_4KSTACKS
>
> for (;;) {
> ... switch to interrupt stack
> }
> #endif
>
>
> Is the intention of this stack overflow check to catch a currently
> running kernel thread that's getting low on stack space, or is the
> intent to make sure there's enough stack space to handle the incoming
> interrupt? if the later, wouldn't you want to potentially switch to
> your interrupt stack to be more accurate? (I recognize that often you
> will have switched to an empty stack, unless you have nested
> interrupts)
>
It checks for both process context (system call or kernel thread) or
interrupt context (nested irqs) stack overflows.
--
Brian Gerst
next prev parent reply other threads:[~2005-03-31 2:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-30 22:10 question about do_IRQ + 4k stacks Terence Ripperda
2005-03-31 2:14 ` Brian Gerst [this message]
2005-04-01 19:09 ` Terence Ripperda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=424B5CFE.6010907@didntduck.org \
--to=bgerst@didntduck.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tripperda@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox