public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@muc.de>
To: "David S. Miller" <davem@redhat.com>
Cc: lord@sgi.com, torvalds@transmeta.com,
	linux-kernel@vger.kernel.org, bcrl@redhat.com
Subject: Re: [RFC] 4KB stack + irq stack for x86
Date: 06 Jun 2002 03:15:17 +0200	[thread overview]
Message-ID: <m3d6v5mcm2.fsf@averell.firstfloor.org> (raw)
In-Reply-To: <20020604225539.F9111@redhat.com> <1023315323.17160.522.camel@jen.americas.sgi.com> <20020605183152.H4697@redhat.com> <20020605.161342.71552259.davem@redhat.com>

"David S. Miller" <davem@redhat.com> writes:

> I agree with Ben, if things explode due to stack overflow with his
> changes they are almost certain to explode before his changes.

Things can explode anyways as handle_irq_event does __sti even when you have
zero stack left. And there can be always another interrupts. But it doesn't 
happen that often in practice as you suggest.

So either fix it completely which would be adding stack checking to 
do_IRQ (and not __sti when you have less than a few hundred bytes left) or 
ignore the case as it doesn't seem to happen in practice regularly
(at least I've never seen it and I see quite a lot of crashes) 

Interrupt stack doesn't fix the fundamental problem. It only makes it less
likely to hit. Crippling user context code for this doesn't seem to be helpful
at least for i386 (although I would prefer it for x86-64 because the 8K 
stack even without interrupts is rather tight for 64bit). But still I would
likely prefer to enlarge the x86-64 stack than to see useful software
not working because of this.

The scenario Steve outlined was rather optimistic - more pessimistic
case would be e.g:
you run NBD which calls the network stack with an complex file system on top
of it called by something else complex that does a GFP_KERNEL alloc and VM 
wants to flush a page via the NBD file system - I don't see how you'll ever 
manage to fit that into 4K.

-Andi


  parent reply	other threads:[~2002-06-06  1:15 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-05  2:55 [RFC] 4KB stack + irq stack for x86 Benjamin LaHaise
2002-06-05 15:33 ` Linus Torvalds
2002-06-05 18:43   ` Benjamin LaHaise
2002-06-05 18:53     ` Linus Torvalds
2002-06-05 21:07       ` Benjamin LaHaise
2002-06-05 22:15 ` Steve Lord
2002-06-05 22:31   ` Benjamin LaHaise
2002-06-05 23:13     ` David S. Miller
2002-06-06  0:24       ` Larry McVoy
2002-06-06  1:15       ` Andi Kleen [this message]
2002-06-02 15:52         ` Pavel Machek
2002-06-09 18:50           ` Andi Kleen
2002-06-06  1:42         ` Benjamin LaHaise
2002-06-06  2:30           ` Stephen Lord
     [not found] <20020604225539.F9111@redhat.com.suse.lists.linux.kernel>
     [not found] ` <Pine.LNX.4.44.0206050820100.2941-100000@home.transmeta.com.suse.lists.linux.kernel>
     [not found]   ` <20020605144357.A4697@redhat.com.suse.lists.linux.kernel>
2002-06-05 20:40     ` Andi Kleen
2002-06-05 20:55       ` Linus Torvalds
  -- strict thread matches above, loose matches on Subject: below --
2002-06-06 13:32 Ulrich Weigand
     [not found] <mailman.1023370621.16639.linux-kernel2news@redhat.com>
2002-06-06 17:37 ` Pete Zaitcev
2002-06-07  1:06   ` David S. Miller
2002-06-06 19:24 Ulrich Weigand
     [not found] <OF70FD985F.A9C66B00-ONC1256BD0.0069C993@de.ibm.com.suse.lists.linux.kernel>
2002-06-06 19:49 ` Andi Kleen
2002-06-06 20:27   ` David Mosberger
2002-06-07 11:28   ` Maciej W. Rozycki
2002-06-06 20:55 Ulrich Weigand
2002-06-06 21:19 ` David Mosberger
2002-06-06 22:10   ` Martin J. Bligh
2002-06-07  0:59   ` William Lee Irwin III

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=m3d6v5mcm2.fsf@averell.firstfloor.org \
    --to=ak@muc.de \
    --cc=bcrl@redhat.com \
    --cc=davem@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lord@sgi.com \
    --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