public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
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: Thu, 19 Jun 2008 09:01:58 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0806190845300.6330@engineering.redhat.com> (raw)
In-Reply-To: <20080618.233713.87158879.davem@davemloft.net>

On Wed, 18 Jun 2008, David Miller wrote:

> From: Mikulas Patocka <mpatocka@redhat.com>
> Date: Thu, 19 Jun 2008 01:17:39 -0400 (EDT)
>
>> I see ... the callee writes arguments into caller's stack frame, if it has
>> variable number of arguments. That it misdesign, the callee should write
>> registers arguments into it's own frame like on AMD64 (then this space
>> would be allocated only if needed).
>
> The callee can do this even for non-variable argument lists.
>
> It's like a set of pre-allocated stack slots for those incoming
> argument registers when reloading under register pressure.
>
> In my opinion it is better to put this onus on the callee because only
> the callee knows if it needs to pop these values onto the stack to
> alleviate register pressure.
>
> I think it might be possible for the compiler to only use 176 bytes.
> I'll take a look at the gcc sparc backend and the ABI specification
> to see if this is the case.

Yes, it could be shrunk to 176 bytes. Maybe there could be some 
performance problems if the spills are cacheline-unaligned. Or better --- 
make special -mkernel-abi function to gcc that will drop this area at all 
and make 128-byte frames. In kernel it wouldn't matter that ABI is 
incompatible.

Mikulas

  reply	other threads:[~2008-06-19 13:02 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-18  0:47 stack overflow on Sparc64 Mikulas Patocka
2008-06-18  4:01 ` David Miller
2008-06-19  3:24   ` Mikulas Patocka
2008-06-19  3:59     ` David Miller
2008-06-19  5:17       ` Mikulas Patocka
2008-06-19  6:37         ` David Miller
2008-06-19 13:01           ` Mikulas Patocka [this message]
2008-06-20 15:47   ` Mikulas Patocka
2008-06-20 17:26     ` David Miller
2008-06-20 20:34       ` Mikulas Patocka
2008-06-20 20:37         ` David Miller
2008-06-20 21:26           ` Mikulas Patocka
2008-06-20 21:41             ` David Miller
2008-06-21  4:51               ` David Miller
2008-06-21 19:42                 ` Mikulas Patocka
2008-06-22  7:03                   ` David Miller
2008-06-22 13:48                     ` Mikulas Patocka
2008-08-12  6:30                   ` David Miller
2008-08-12  8:22                     ` David Miller
2008-08-13  0:53                       ` Mikulas Patocka
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:22                       ` console handover badness David Miller
2008-08-13  1:40                       ` David Miller
2008-08-13  8:50                         ` David Miller
2008-08-13 12:46                         ` Mikulas Patocka
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:25                               ` Bootmem allocator broken David Miller
2008-08-15 11:09                                 ` Alexander Beregalov
2008-08-15 21:13                                   ` David Miller
2008-08-14 23:40                               ` Johannes Weiner
2008-06-20 21:14       ` stack overflow on Sparc64 Mikulas Patocka
2008-06-20 21:20         ` David Miller
2008-06-20 21:25           ` Mikulas Patocka
2008-06-20 21:44             ` David Miller
2008-06-20 21:47               ` David Miller
2008-06-20 22:22                 ` Mikulas Patocka
2008-06-20 22:28                   ` David Miller
2008-06-20 22:36                     ` Mikulas Patocka
2008-06-20 22:47                       ` David Miller
2008-06-21  0:37                         ` Mikulas Patocka
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.0806190845300.6330@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox