public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Andi Kleen <ak@suse.de>
Cc: Adrian Bunk <bunk@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86: unify x86 Makefile(s)
Date: Sat, 29 Dec 2007 19:58:42 +0100	[thread overview]
Message-ID: <20071229185842.GA20099@uranus.ravnborg.org> (raw)
In-Reply-To: <200712291924.52077.ak@suse.de>

On Sat, Dec 29, 2007 at 07:24:51PM +0100, Andi Kleen wrote:
> 
> > 
> > This is the version that should exhibit the behaviour with increased text size.
> 
> The issue was not text size (u-a-a-t generally decreases that) but maximum stack usage.
> You need to check make checkstack output.

gcc 3.4.5 with: -fno-unit-at-a-time:
0xc0173b9a do_sys_poll [vmlinux]:			852
0xc0173cc2 do_sys_poll [vmlinux]:			852
0xc0206f8e nlmclnt_reclaim [vmlinux]:			704
0xc020701e nlmclnt_reclaim [vmlinux]:			704
0xc01a2c83 reiserfs_rename [vmlinux]:			668
0xc01a34a0 reiserfs_rename [vmlinux]:			668
0xc0173052 do_select [vmlinux]:				656
0xc0173320 do_select [vmlinux]:				656
0xc0417ceb do_ipv6_setsockopt [vmlinux]:		608
0xc0418746 do_ipv6_setsockopt [vmlinux]:		608

gcc 3.4.5 with: -funit-at-a-time:
0xc02926e8 lo_ioctl [vmlinux]:				1336
0xc0293055 lo_ioctl [vmlinux]:				1336
0xc03bf222 dev_ethtool [vmlinux]:			908
0xc03c00e5 dev_ethtool [vmlinux]:			908
0xc036adf9 cdrom_open [vmlinux]:			892
0xc036b78d cdrom_open [vmlinux]:			892
0xc0172445 do_sys_poll [vmlinux]:			860
0xc01726e9 do_sys_poll [vmlinux]:			860
0xc020fca3 sys_semctl [vmlinux]:			796
0xc0210447 sys_semctl [vmlinux]:			796
0xc02058af nlmclnt_reclaim [vmlinux]:			704
0xc020593f nlmclnt_reclaim [vmlinux]:			704
0xc01719d4 do_select [vmlinux]:				668
0xc0171d59 do_select [vmlinux]:				668
0xc01a121a reiserfs_rename [vmlinux]:			668
0xc01a1a54 reiserfs_rename [vmlinux]:			668
0xc0412e39 ipv6_setsockopt [vmlinux]:			612
0xc04138ca ipv6_setsockopt [vmlinux]:			612

So here we indeed see the expected (bad) behaviour.
unit-at-a-time causes much higher stack usage in some spots.
Above is listed only the hits above 600 bytes.

Until we are on par with stack usage I recommend to keep
-fno-unit-at-a-time disabled for gcc less than 4.00 as
suggested by Adrian (as is what we have today).

	Sam

  reply	other threads:[~2007-12-29 18:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-28 21:23 [PATCH] x86: unify x86 Makefile(s) Sam Ravnborg
2007-12-28 22:13 ` Adrian Bunk
2007-12-29  2:14   ` Andi Kleen
2007-12-29  8:07     ` Adrian Bunk
2007-12-29  9:39   ` Sam Ravnborg
2007-12-29  9:52     ` Adrian Bunk
2007-12-29 12:16       ` Andi Kleen
2007-12-29 12:54         ` Adrian Bunk
2007-12-29 18:22           ` Sam Ravnborg
2007-12-29 18:24             ` Andi Kleen
2007-12-29 18:58               ` Sam Ravnborg [this message]
2007-12-29 21:17                 ` Andi Kleen
2007-12-29 21:45                   ` Adrian Bunk
2007-12-30  2:00                     ` Andi Kleen
2007-12-30 11:01                       ` Adrian Bunk
2007-12-29  2:22 ` Andi Kleen
2007-12-29  8:07   ` Sam Ravnborg

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=20071229185842.GA20099@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=ak@suse.de \
    --cc=bunk@kernel.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /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