From: Mikulas Patocka <mpatocka@redhat.com>
To: David Miller <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, agk@redhat.com
Subject: Re: stack overflow on Sparc64
Date: Fri, 20 Jun 2008 22:33:06 +0000 [thread overview]
Message-ID: <Pine.LNX.4.64.0806201824190.25997@engineering.redhat.com> (raw)
In-Reply-To: <20080620.144424.168785883.davem@davemloft.net>
On Fri, 20 Jun 2008, David Miller wrote:
> From: Mikulas Patocka <mpatocka@redhat.com>
> Date: Fri, 20 Jun 2008 17:25:26 -0400 (EDT)
>
>> On Fri, 20 Jun 2008, David Miller wrote:
>>
>>> From: Mikulas Patocka <mpatocka@redhat.com>
>>> Date: Fri, 20 Jun 2008 17:14:41 -0400 (EDT)
>>>
>>> It means i386 and every other platform potentially has the same exact
>>> problem.
>>>
>>> What point wrt. sparc64 are you trying to make here? :-)
>>
>> The difference is that i386 takes minimum 4 bytes per stack frame and
>> sparc64 192 bytes per stack frame. So this problem will kill sparc64
>> sooner.
>>
>> But yes, it is general problem and should be solved in arch-independent
>> code.
>
> I agree on both counts. Although I'm curious what the average stack
> frame sizes look like on x86_64 and i386, and also how this area
> appears on powerpc.
If I look at an old oops that I have in my log on i386: it's 1104 stack
bytes ~ 38 functions.
> One mitigating factor on sparc64 is that typically when there are lots
> of devices with interrupts there are also lots of cpus, and we evenly
> distribute the IRQ targetting amongst the available cpus on sparc64.
>
> This is probably why, in practice, these problems tend to not surface
> often.
>
> In any event, with the work you've accomplished and my implementation
> of IRQ stacks for sparc64 we should be able to get things in much
> better shape.
I created this to help with nested irqs:
--- linux-2.6.26-rc5-devel.orig/include/linux/interrupt.h 2008-06-20
23:34:04.000000000 +0200
+++ linux-2.6.26-rc5-devel/include/linux/interrupt.h 2008-06-20
23:36:03.000000000 +0200
@@ -95,7 +95,7 @@
#ifdef CONFIG_LOCKDEP
# define local_irq_enable_in_hardirq() do { } while (0)
#else
-# define local_irq_enable_in_hardirq() local_irq_enable()
+# define local_irq_enable_in_hardirq() do { if (hardirq_count() <= (1 <<
HARDIRQ_SHIFT)) local_irq_enable(); } while (0)
#endif
extern void disable_irq_nosync(unsigned int irq);
Mikulas
WARNING: multiple messages have this Message-ID (diff)
From: Mikulas Patocka <mpatocka@redhat.com>
To: David Miller <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, agk@redhat.com
Subject: Re: stack overflow on Sparc64
Date: Fri, 20 Jun 2008 18:33:06 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0806201824190.25997@engineering.redhat.com> (raw)
In-Reply-To: <20080620.144424.168785883.davem@davemloft.net>
On Fri, 20 Jun 2008, David Miller wrote:
> From: Mikulas Patocka <mpatocka@redhat.com>
> Date: Fri, 20 Jun 2008 17:25:26 -0400 (EDT)
>
>> On Fri, 20 Jun 2008, David Miller wrote:
>>
>>> From: Mikulas Patocka <mpatocka@redhat.com>
>>> Date: Fri, 20 Jun 2008 17:14:41 -0400 (EDT)
>>>
>>> It means i386 and every other platform potentially has the same exact
>>> problem.
>>>
>>> What point wrt. sparc64 are you trying to make here? :-)
>>
>> The difference is that i386 takes minimum 4 bytes per stack frame and
>> sparc64 192 bytes per stack frame. So this problem will kill sparc64
>> sooner.
>>
>> But yes, it is general problem and should be solved in arch-independent
>> code.
>
> I agree on both counts. Although I'm curious what the average stack
> frame sizes look like on x86_64 and i386, and also how this area
> appears on powerpc.
If I look at an old oops that I have in my log on i386: it's 1104 stack
bytes ~ 38 functions.
> One mitigating factor on sparc64 is that typically when there are lots
> of devices with interrupts there are also lots of cpus, and we evenly
> distribute the IRQ targetting amongst the available cpus on sparc64.
>
> This is probably why, in practice, these problems tend to not surface
> often.
>
> In any event, with the work you've accomplished and my implementation
> of IRQ stacks for sparc64 we should be able to get things in much
> better shape.
I created this to help with nested irqs:
--- linux-2.6.26-rc5-devel.orig/include/linux/interrupt.h 2008-06-20
23:34:04.000000000 +0200
+++ linux-2.6.26-rc5-devel/include/linux/interrupt.h 2008-06-20
23:36:03.000000000 +0200
@@ -95,7 +95,7 @@
#ifdef CONFIG_LOCKDEP
# define local_irq_enable_in_hardirq() do { } while (0)
#else
-# define local_irq_enable_in_hardirq() local_irq_enable()
+# define local_irq_enable_in_hardirq() do { if (hardirq_count() <= (1 <<
HARDIRQ_SHIFT)) local_irq_enable(); } while (0)
#endif
extern void disable_irq_nosync(unsigned int irq);
Mikulas
next prev parent reply other threads:[~2008-06-20 22:33 UTC|newest]
Thread overview: 86+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-18 0:47 stack overflow on Sparc64 Mikulas Patocka
2008-06-18 0:47 ` Mikulas Patocka
2008-06-18 4:01 ` David Miller
2008-06-18 4:01 ` David Miller
2008-06-19 3:24 ` Mikulas Patocka
2008-06-19 3:24 ` Mikulas Patocka
2008-06-19 3:59 ` David Miller
2008-06-19 3:59 ` David Miller
2008-06-19 5:17 ` Mikulas Patocka
2008-06-19 5:17 ` Mikulas Patocka
2008-06-19 6:37 ` David Miller
2008-06-19 6:37 ` David Miller
2008-06-19 13:01 ` Mikulas Patocka
2008-06-19 13:01 ` Mikulas Patocka
2008-06-20 15:47 ` Mikulas Patocka
2008-06-20 15:47 ` Mikulas Patocka
2008-06-20 17:26 ` David Miller
2008-06-20 17:26 ` David Miller
2008-06-20 20:34 ` Mikulas Patocka
2008-06-20 20:34 ` Mikulas Patocka
2008-06-20 20:37 ` David Miller
2008-06-20 20:37 ` David Miller
2008-06-20 21:26 ` Mikulas Patocka
2008-06-20 21:26 ` Mikulas Patocka
2008-06-20 21:41 ` David Miller
2008-06-20 21:41 ` David Miller
2008-06-21 4:51 ` David Miller
2008-06-21 4:51 ` David Miller
2008-06-21 19:42 ` Mikulas Patocka
2008-06-21 19:42 ` Mikulas Patocka
2008-06-22 7:03 ` David Miller
2008-06-22 7:03 ` David Miller
2008-06-22 13:48 ` Mikulas Patocka
2008-06-22 13:48 ` Mikulas Patocka
2008-08-12 6:30 ` David Miller
2008-08-12 6:30 ` David Miller
2008-08-12 8:22 ` David Miller
2008-08-12 8:22 ` David Miller
2008-08-13 0:53 ` Mikulas Patocka
2008-08-13 0:53 ` Mikulas Patocka
2008-08-13 0:59 ` David Miller
2008-08-13 0:59 ` David Miller
2008-08-13 1:11 ` console handover badness [was: stack overflow on Sparc64] Mikulas Patocka
2008-08-13 1:11 ` Mikulas Patocka
2008-08-13 1:22 ` console handover badness David Miller
2008-08-13 1:22 ` David Miller
2008-08-13 1:40 ` David Miller
2008-08-13 1:40 ` David Miller
2008-08-13 8:50 ` David Miller
2008-08-13 8:50 ` David Miller
2008-08-13 12:46 ` Mikulas Patocka
2008-08-13 12:46 ` Mikulas Patocka
2008-08-14 3:25 ` David Miller
2008-08-14 3:25 ` David Miller
2008-08-14 23:11 ` Bootmem allocator broken [was: console handover badness] Mikulas Patocka
2008-08-14 23:11 ` Mikulas Patocka
2008-08-14 23:25 ` Bootmem allocator broken David Miller
2008-08-14 23:25 ` David Miller
2008-08-15 11:09 ` Alexander Beregalov
2008-08-15 11:09 ` Alexander Beregalov
2008-08-15 21:13 ` David Miller
2008-08-15 21:13 ` David Miller
2008-08-14 23:40 ` Johannes Weiner
2008-08-14 23:40 ` Johannes Weiner
2008-06-20 21:14 ` stack overflow on Sparc64 Mikulas Patocka
2008-06-20 21:14 ` Mikulas Patocka
2008-06-20 21:20 ` David Miller
2008-06-20 21:20 ` David Miller
2008-06-20 21:25 ` Mikulas Patocka
2008-06-20 21:25 ` Mikulas Patocka
2008-06-20 21:44 ` David Miller
2008-06-20 21:44 ` David Miller
2008-06-20 21:47 ` David Miller
2008-06-20 21:47 ` David Miller
2008-06-20 22:22 ` Mikulas Patocka
2008-06-20 22:22 ` Mikulas Patocka
2008-06-20 22:28 ` David Miller
2008-06-20 22:28 ` David Miller
2008-06-20 22:36 ` Mikulas Patocka
2008-06-20 22:36 ` Mikulas Patocka
2008-06-20 22:47 ` David Miller
2008-06-20 22:47 ` David Miller
2008-06-21 0:37 ` Mikulas Patocka
2008-06-21 0:37 ` Mikulas Patocka
2008-06-20 22:33 ` Mikulas Patocka [this message]
2008-06-20 22:33 ` Mikulas Patocka
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=Pine.LNX.4.64.0806201824190.25997@engineering.redhat.com \
--to=mpatocka@redhat.com \
--cc=agk@redhat.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=sparclinux@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.