mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Richard Gooch <rgooch@ras.ucalgary.ca>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: torvalds@transmeta.com (Linus Torvalds),
	aki.jain@stanford.edu (Akash Jain),
	linux-kernel@vger.kernel.org, su.class.cs99q@nntp.stanford.edu
Subject: Re: [PATCH] fs/devfs/base.c
Date: Mon, 4 Jun 2001 01:07:14 -0600	[thread overview]
Message-ID: <200106040707.f5477ET11421@vindaloo.ras.ucalgary.ca> (raw)
In-Reply-To: <E156o6c-0005AB-00@the-village.bc.nu>
In-Reply-To: <Pine.LNX.4.21.0106031652090.32451-100000@penguin.transmeta.com> <E156o6c-0005AB-00@the-village.bc.nu>

Alan Cox writes:
> >  - the kernel stack is 4kB, and _nobody_ has the right to eat up a
> >    noticeable portion of it. It doesn't matter if you "know" your caller
> 
> Umm Linus on what platform - its 8K or more on all that I can think of

I assume he's referring to what's left after you take out the task
struct. More than 4 kiB, so 4 kiB is a conservative estimate.

> > Ergo: the simple rule of "don't allocate big structures of the stack" is
> > always a good rule, and making excuses for it is bad.
> 
> We have a very large number of violators of 1K of stack, and very
> few of 2K right now.

I guess we should ask the question as to what's an acceptable usage.
Theoretically, any amount could pose a problem, but that's hardly a
useful position to work from. Some decision or guideline about a
practical limit would be helpful. My gut feeling is that 1 kiB is
around the limit for functions with a well defined call path. The
limit should probably be less for generic functions and interrupt
handlers.

				Regards,

					Richard....
Permanent: rgooch@atnf.csiro.au
Current:   rgooch@ras.ucalgary.ca

  parent reply	other threads:[~2001-06-04  7:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-27 10:12 Akash Jain
2001-05-27 13:21 ` Richard Gooch
2001-05-28 14:43   ` Maximum size of automatic allocation? (was: [PATCH] fs/devfs/base.c) Daniel Phillips
2001-06-03 23:55   ` [PATCH] fs/devfs/base.c Linus Torvalds
2001-06-04  6:44     ` Alan Cox
2001-06-04 10:09       ` Linus Torvalds
2001-06-05  1:41       ` Dawson R Engler
2001-06-05  8:49       ` Ingo Molnar
2001-06-04  7:07     ` Richard Gooch [this message]
2001-06-04 19:26       ` Bill Pringlemeir
2001-06-04 19:39         ` Kernel Stack usage [was: [PATCH] fs/devfs/base.c] Bill Pringlemeir
2001-06-05  6:10         ` [PATCH] fs/devfs/base.c H. Peter Anvin
2001-06-05  6:56           ` Alan Cox
2001-06-05 11:37             ` Andrew Morton
2001-06-05 21:38             ` Pavel Machek
2001-06-04 20:15     ` Daniel Phillips
2001-06-05  4:24     ` Paul Mackerras
2001-06-04  0:03   ` Richard Gooch

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=200106040707.f5477ET11421@vindaloo.ras.ucalgary.ca \
    --to=rgooch@ras.ucalgary.ca \
    --cc=aki.jain@stanford.edu \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=su.class.cs99q@nntp.stanford.edu \
    --cc=torvalds@transmeta.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

all inboxes | Powered by JetHome®