LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Blaisorblade <blaisorblade@yahoo.it>
To: user-mode-linux-devel@lists.sourceforge.net
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Jeff Dike <jdike@addtoit.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [uml-devel] [PATCH 4/5] UML - Simplify helper stack handling
Date: Tue, 3 Jul 2007 17:28:30 +0200	[thread overview]
Message-ID: <200707031728.36472.blaisorblade@yahoo.it> (raw)
In-Reply-To: <20070627233701.8e53f3cb.akpm@linux-foundation.org>

[-- Attachment #1: Type: text/plain, Size: 1608 bytes --]

On giovedì 28 giugno 2007, Andrew Morton wrote:
> So I'm running the generic version of this on i386 with 8k stacks (below),
> with a quick LTP run.
>
> Holy cow, either we use a _lot_ of stack or these numbers are off:
>
> vmm:/home/akpm> dmesg -s 1000000|grep 'bytes left'
> khelper used greatest stack depth: 7176 bytes left
> khelper used greatest stack depth: 7064 bytes left
> khelper used greatest stack depth: 6840 bytes left
> khelper used greatest stack depth: 6812 bytes left
> hostname used greatest stack depth: 6636 bytes left
> uname used greatest stack depth: 6592 bytes left
> uname used greatest stack depth: 6284 bytes left
> hotplug used greatest stack depth: 5568 bytes left
> rpc.nfsd used greatest stack depth: 5136 bytes left
> chown02 used greatest stack depth: 4956 bytes left
> fchown01 used greatest stack depth: 4892 bytes left

> That's the sum of process stack and interrupt stack, but I doubt if this
> little box is using much interrupt stack space.
>
> No wonder people are still getting stack overflows with 4k stacks...

First, those numbers pretend to be _unused_ stack space.

Well, UML tends to use more stack space than the rest of kernel. Apart it has 
a bit more layering (even if less than in the past), we must use libc's 
function too, and they're not written to be executed on an 8k stack.

We've reimplemented libc's printf() in terms of kernel sprintf() because it 
used 32K of stack.
-- 
Inform me of my mistakes, so I can add them to my list!
Paolo Giarrusso, aka Blaisorblade
http://www.user-mode-linux.org/~blaisorblade

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2007-07-03 15:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-14 20:26 Jeff Dike
2007-06-26 20:35 ` Andrew Morton
2007-06-26 21:53   ` [uml-devel] " Jeff Dike
2007-06-26 22:07     ` Andrew Morton
2007-06-28  6:37 ` Andrew Morton
2007-07-03 15:28   ` Blaisorblade [this message]
2007-07-03 15:58     ` [uml-devel] " Andrew Morton
2007-07-03 17:26     ` Jeff Dike
2007-08-05 20:41   ` Luca Tettamanti
2007-08-05 20:54     ` Andrew Morton

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=200707031728.36472.blaisorblade@yahoo.it \
    --to=blaisorblade@yahoo.it \
    --cc=akpm@linux-foundation.org \
    --cc=jdike@addtoit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    --subject='Re: [uml-devel] [PATCH 4/5] UML - Simplify helper stack handling' \
    /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

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).