kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: jay.aurabind@gmail.com (Jay Aurabind)
To: kernelnewbies@lists.kernelnewbies.org
Subject: large frame size warning when compiling
Date: Fri, 9 May 2014 17:39:21 +0530	[thread overview]
Message-ID: <20140509120917.GA6218@gmail.com> (raw)
In-Reply-To: <19006.1399564003@turing-police.cc.vt.edu>

On Thu, May 08, 2014 at 11:46:43AM -0400, Valdis.Kletnieks at vt.edu wrote:
> On Thu, 08 May 2014 09:24:38 +0530, Jay Aurabind said:
> > > Allocating 1K on the stack is indeed evil.
> >
> > Why would you say evil ? I didnt quite get why you meant by that. Is it
> > at some extremes ? 1K is from the default ubuntu 14.04 config.
> 
> Some paths in the kernel get very deep stacks (for instance, nfs reading
> an xfs file that's on an lvm partition on a dm-crypt target is famous for
> blowing the stack without any further help).  On my laptop, the low-water
> mark is already pretty low:
> 
> % dmesg | grep 'stack depth'
> [    2.094319] cryptomgr_test (42) used greatest stack depth: 6456 bytes left
> [    2.952135] modprobe (91) used greatest stack depth: 5904 bytes left
> [    2.955593] modprobe (93) used greatest stack depth: 5848 bytes left
> [    2.955953] cryptomgr_probe (94) used greatest stack depth: 5520 bytes left
> [    4.145573] systemd-cgroups (135) used greatest stack depth: 5440 bytes left
> [    4.859260] udevadm (255) used greatest stack depth: 4920 bytes left
> [    4.966646] ata_id (268) used greatest stack depth: 4088 bytes left
> [  145.528777] dhclient (1306) used greatest stack depth: 4072 bytes left
> [  226.188576] ip (2232) used greatest stack depth: 3344 bytes left
> [  300.303981] ip (2468) used greatest stack depth: 3152 bytes left
> 
> So in the first 5 minutes, I already was down to 3K of stack. All it takes
> is that code interacting with another code that allocates 1K popping when I
> was at that 3K low water mark, and my kernel is in deep juju.
> 
> The fact the 1K is in the default Ubuntu config just means that the kernel as
> distributed has bad code in it. :)
> 
Thank you Valdis for the explaination. My stack depth is also similar to
yours:
[    1.567353] cryptomgr_test (52) used greatest stack depth: 6656 bytes left
[    2.871152] modprobe (85) used greatest stack depth: 5624 bytes left
[    2.894478] modprobe (93) used greatest stack depth: 5552 bytes left
[    4.212907] all_generic_ide (127) used greatest stack depth: 5448 bytes left
[    4.440752] udevadm (134) used greatest stack depth: 4488 bytes left
[    4.571276] ata_id (165) used greatest stack depth: 4448 bytes left
[    7.661284] btrfs (183) used greatest stack depth: 4424 bytes left
[    7.859625] systemd-udevd (133) used greatest stack depth: 4392 bytes left
[    8.898118] hostname (208) used greatest stack depth: 4208 bytes left
[    9.341028] sh (209) used greatest stack depth: 4088 bytes left
[   48.353719] systemd-udevd (506) used greatest stack depth: 3768 bytes left
[  304.162368] kworker/u8:0 (6) used greatest stack depth: 3656 bytes left

Apparently no other activity is happening which is decreasing the depth further, even after running some applications like firefox. So shouldnt we assume that initial value (somewhere around 6K) should be enough since the maximum it went down is only till its 50% mark ?

  reply	other threads:[~2014-05-09 12:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-07 16:36 large frame size warning when compiling Jay Aurabind
2014-05-07 16:51 ` Valdis.Kletnieks at vt.edu
2014-05-08  3:54   ` Jay Aurabind
2014-05-08 15:46     ` Valdis.Kletnieks at vt.edu
2014-05-09 12:09       ` Jay Aurabind [this message]
2014-05-09 15:30         ` Valdis.Kletnieks at vt.edu
2014-05-10  6:43           ` Jay Aurabind
2014-05-09 15:56       ` Frank Ch. Eigler
2014-05-08 12:38 ` Martin Kepplinger
2014-05-09 12:13   ` Jay Aurabind
2014-05-09 12:36     ` Paul Davies C

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=20140509120917.GA6218@gmail.com \
    --to=jay.aurabind@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.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;
as well as URLs for NNTP newsgroup(s).