From: Peter Osterlund <petero2@telia.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>,
trond.myklebust@fys.uio.no
Subject: Re: Linux 2.6.7-rc2
Date: 31 May 2004 11:21:39 +0200 [thread overview]
Message-ID: <m3y8n93qak.fsf@telia.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0405292349110.1632@ppc970.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
> Andrew Morton:
> o Add `make checkstack' target
The checkstack target itself works fine, but when I used it I found
that nfs_writepage_sync and nfs_readpage_sync still use a lot of stack
space:
0xc01aae14 nfs_writepage_sync: 900
0xc01a9492 nfs_readpage_sync: 872
Apparently, this recent fix
http://linux.bkbits.net:8080/linux-2.5/gnupatch@40ad0ce2ZBGzb_taAzCTOJ38IXxu-w
doesn't really help, at least not with the compilers I have tested, ie
gcc 3.3.3 from FC2 and the gcc from RH9.
If I put "#if 0" around the *wdata assignment in nfs_writepage_sync,
the stack usage goes down to 36, so it looks like gcc is building a
temporary structure on the stack and then copies the whole thing to
*wdata.
Does this construct save stack space for any version of gcc? Maybe the
code should be changed to do a memset() followed by explicit
initialization of the non-zero member variables instead.
#if 0
*wdata = (struct nfs_write_data) {
.flags = how,
.cred = NULL,
.inode = inode,
.args = {
.fh = NFS_FH(inode),
.lockowner = current->files,
.pages = &page,
.stable = NFS_FILE_SYNC,
.pgbase = offset,
.count = wsize,
},
.res = {
.fattr = &wdata->fattr,
.verf = &wdata->verf,
},
};
#endif
--
Peter Osterlund - petero2@telia.com
http://w1.894.telia.com/~u89404340
next prev parent reply other threads:[~2004-05-31 9:22 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-30 6:52 Linux 2.6.7-rc2 Linus Torvalds
2004-05-30 7:56 ` Danny ter Haar
2004-05-30 11:09 ` Francois Romieu
2004-05-30 13:16 ` Danny ter Haar
2004-05-30 13:24 ` Danny ter Haar
2004-05-30 16:26 ` Malte Schröder
2004-05-30 17:26 ` Jeff Garzik
2004-05-31 9:21 ` Peter Osterlund [this message]
2004-05-31 9:27 ` Andrew Morton
2004-05-31 16:58 ` Linus Torvalds
2004-05-31 22:04 ` Peter Osterlund
2004-06-03 20:01 ` Flavio Stanchina
2004-06-01 3:44 ` Linux 2.6.7-rc2 (compile stats) John Cherry
2004-06-01 16:07 ` 2.6.7-rc2: .bss.page_aligned warning with gcc 2.95 Adrian Bunk
2004-06-02 14:37 ` Linux 2.6.7-rc2 Thomas Zehetbauer
2004-06-04 14:06 ` Denis Vlasenko
2004-06-08 17:02 ` Bill Davidsen
2004-06-08 18:02 ` David Ford
2004-06-09 6:37 ` sk98lin (was: Re: Linux 2.6.7-rc2) Geert Uytterhoeven
2004-06-10 15:03 ` SCSI_DPT_I2O " Geert Uytterhoeven
2004-06-10 15:33 ` ide-proc.c " Geert Uytterhoeven
-- strict thread matches above, loose matches on Subject: below --
2004-05-31 12:20 Linux 2.6.7-rc2 Albert Cahalan
2004-05-31 16:53 ` Linus Torvalds
2004-05-31 15:12 ` Albert Cahalan
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=m3y8n93qak.fsf@telia.com \
--to=petero2@telia.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
--cc=trond.myklebust@fys.uio.no \
/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