linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Tom Rini <trini@kernel.crashing.org>
To: Neil Horman <nhorman@lvl7.com>
Cc: "Kim, Kwansuk" <kskim@neowave.co.kr>,
	linuxppc-embedded@lists.linuxppc.org
Subject: Re: The maximum size of stack in linuxppc kernel
Date: Fri, 19 Apr 2002 08:00:26 -0700	[thread overview]
Message-ID: <20020419150026.GA31656@opus.bloom.county> (raw)
In-Reply-To: <3CC00515.4429E463@lvl7.com>


On Fri, Apr 19, 2002 at 07:52:53AM -0400, Neil Horman wrote:

> Hello-
>     The exact size of the stack is based on the size of the task_union structure
> in sched.h.  Because of the way a union works in C the task_struct defined in
> the union is aligned toward the low address end of the structure, which is
> overall 8K in length, to satisfy the stack variable space requirements.  The
> remainder of that space is used as kernel stack on behalf of whichever process
> causes a trap into the kernel.  I think in the event of an interrupt, the kernel
> stack used is whichever one the current variable points to.  So to summarize,
> the total allocated kernel stack size for any given process is 8K minus the size
> of the task structure defined in sched.h

And, if you're finding your self in need of growing the stack, you need
to stop and think about what you're doing since this is almost always
the wrong approach.

--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

      reply	other threads:[~2002-04-19 15:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-19 11:38 The maximum size of stack in linuxppc kernel Kim, Kwansuk
2002-04-19 11:52 ` Neil Horman
2002-04-19 15:00   ` Tom Rini [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=20020419150026.GA31656@opus.bloom.county \
    --to=trini@kernel.crashing.org \
    --cc=kskim@neowave.co.kr \
    --cc=linuxppc-embedded@lists.linuxppc.org \
    --cc=nhorman@lvl7.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).