From: Stefan Rompf <stefan@loplof.de>
To: Arjan van de Ven <arjan@infradead.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [2.6 patch] i386: always use 4k/4k stacks
Date: Sun, 18 Dec 2005 13:04:37 +0100 [thread overview]
Message-ID: <200512181304.38054.stefan@loplof.de> (raw)
In-Reply-To: <1134904884.9626.7.camel@laptopd505.fenrus.org>
Am Sonntag 18 Dezember 2005 12:21 schrieb Arjan van de Ven:
> the kernel has a stack overflow detector, which checks at irq entry time
> if the stack is "rather high" (7kb into the stack on a 8kb stack, 3.5kb
> on a 4k stack). When this warning hits there's still runway left (like
> 12.5 percent), but lets say the end becomes in sight. If the stack usage
> would be really tight, this "early warning" detector would be hitting a
> lot of people, right?
Wrong. The probability that an interrupt happens just during the codepath with
highest stack usage is very small. Anyway CONFIG_DEBUG_STACKOVERFLOW is not
enabled in 2.6.14.4 i386 defconfig. Don't know about vendor kernel kernels
though.
I thought more about filling the stack with some arbitrary value on thread
startup and checking how much has been overwritten on a regular basis. Part
of it is alreay there, hidden unter CONFIG_DEBUG_STACK_USAGE. The
verification should just happen timer-controlled, not only on sysrq-whatever.
> (and the "safety net" is a bit of misnomer, since it's not really safe,
> just "statistically different" if the shit hits the fan)
If you can't even guarantee that 8k (or 6k) is enough, how can you vote for 4k
then ;-) Just a little provocation, I don't plan getting too involved into
this dicussion, hell, this is just about a ridiculously small amount of self
contained #ifdef'd code ;-)
Stefan
next prev parent reply other threads:[~2005-12-18 12:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-18 10:49 [2.6 patch] i386: always use 4k stacks Stefan Rompf
2005-12-18 11:21 ` [2.6 patch] i386: always use 4k/4k stacks Arjan van de Ven
2005-12-18 12:04 ` Stefan Rompf [this message]
2005-12-18 12:09 ` Arjan van de Ven
2005-12-19 9:43 ` Helge Hafting
2005-12-18 12:06 ` [2.6 patch] i386: always use 4k stacks Alan Cox
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=200512181304.38054.stefan@loplof.de \
--to=stefan@loplof.de \
--cc=arjan@infradead.org \
--cc=linux-kernel@vger.kernel.org \
/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
Powered by JetHome