From: David Chinner <dgc@sgi.com>
To: David Chinner <dgc@sgi.com>
Cc: Jesper Juhl <jesper.juhl@gmail.com>,
chatz@melbourne.sgi.com, LKML <linux-kernel@vger.kernel.org>,
xfs@oss.sgi.com, xfs-masters@oss.sgi.com, netdev@vger.kernel.org,
linux-scsi@vger.kernel.org, kaos@sgi.com
Subject: Re: 2.6.19-rc6 : Spontaneous reboots, stack overflows - seems to implicate xfs, scsi, networking, SMP
Date: Wed, 29 Nov 2006 12:56:04 +1100 [thread overview]
Message-ID: <20061129015604.GA33919298@melbourne.sgi.com> (raw)
In-Reply-To: <20061123011809.GY37654165@melbourne.sgi.com>
On Thu, Nov 23, 2006 at 12:18:09PM +1100, David Chinner wrote:
> On Wed, Nov 22, 2006 at 01:58:11PM +0100, Jesper Juhl wrote:
> >
> > Attached are two files. The one named stack_overflows.txt.gz contains
> > one instance of each unique stack overflow + trace that I've got. The
> > other file named kernel_BUG.txt.gz contains a few BUG() messages that
> > were also in the logs.
....
> I've just checked on a 2.6.17 build on i386 how much stack we
> are using (from checkstack.pl with min size reported set to 32 bytes)
> here in XFS:
....
> So, assuming the stacks less than 32 bytes are 32 bytes, we've got
> 1380 bytes in the XFS stack there, and very few functions where it
> can be reduced further. Still, 1380 bytes is way, way short of 4KB,
> so unless there is extra stack usage that checkstack doesn't tell us
> about I'm not sure why this amount of usage is causing repeated
> stack overflows with very little stack usage on either side of it.
>
> Can someone enlighten me as to where all the rest of the stack
> is being used up here?
FYI.
With some help from Keith Owens, we've determined that gcc 3.3.5
resulted in XFS stack usage of about 1.9KB through the writeback and
allocation path with another ~800 bytes of stack usage in generic
code in this path.
The big difference between the numbers I was getting from checkstack
and reality was CONFIG_CC_OPTIMISE_FOR_SIZE=y being set on the
kernels I was stack checking. IOWs, CONFIG_CC_OPTIMISE_FOR_SIZE=y
appears to reduce XFS stack usage by at least 20% and so probably
should be used with XFS on 4k stacks.
Keith also confirmed that gcc-4.1's aggressive inlining of static
functions substantially increases stack usage (by ~15%) through this
call chain. Given that many of the inlined static functions are not
required by the critical path (i.e. they'd previously been factored
out to reduce stack usage), gcc is effectively undoing past mods
that had substantially reduced XFS's stack usage.
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
prev parent reply other threads:[~2006-11-29 1:56 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-21 9:27 2.6.19-rc6 : Spontaneous reboots, stack overflows - seems to implicate xfs, scsi, networking, SMP Jesper Juhl
2006-11-21 21:53 ` David Chatterton
2006-11-21 22:02 ` Jesper Juhl
2006-11-21 23:31 ` David Chinner
2006-11-21 23:51 ` Jesper Juhl
2006-11-22 12:58 ` Jesper Juhl
2006-11-22 20:01 ` Stephen Hemminger
2006-11-23 10:27 ` Jesper Juhl
2006-11-23 1:18 ` David Chinner
2006-11-23 4:10 ` David Miller
2006-11-23 4:35 ` Al Viro
2006-11-23 6:47 ` Matthew Wilcox
2006-11-23 8:12 ` Arjan van de Ven
2006-11-23 22:08 ` [xfs-masters] " Nathan Scott
2006-11-26 14:31 ` Eric Sandeen
2006-11-23 7:08 ` David Chinner
2006-11-23 13:16 ` Ingo Oeser
2006-11-23 18:37 ` Arjan van de Ven
2006-11-23 19:54 ` David Miller
2006-11-24 0:55 ` David Chinner
2006-11-24 1:08 ` Jesper Juhl
2006-11-24 2:05 ` David Chinner
2006-11-24 7:52 ` Arjan van de Ven
2006-11-23 19:42 ` David Miller
2006-11-29 1:56 ` David Chinner [this message]
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=20061129015604.GA33919298@melbourne.sgi.com \
--to=dgc@sgi.com \
--cc=chatz@melbourne.sgi.com \
--cc=jesper.juhl@gmail.com \
--cc=kaos@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=xfs-masters@oss.sgi.com \
--cc=xfs@oss.sgi.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;
as well as URLs for NNTP newsgroup(s).