mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
To: "Randy.Dunlap" <rddunlap@osdl.org>
Cc: Russell King <rmk@arm.linux.org.uk>,
	kraxel@bytesex.org, linux-kernel@vger.kernel.org
Subject: Re: reducing stack usage in v4l?
Date: Wed, 5 Mar 2003 22:40:17 +0100	[thread overview]
Message-ID: <20030305214017.GA25225@wohnheim.fh-wedel.de> (raw)
In-Reply-To: <20030305073437.0673458e.rddunlap@osdl.org>

On Wed, 5 March 2003 07:34:37 -0800, Randy.Dunlap wrote:
> Russell King <rmk@arm.linux.org.uk> wrote:
> | On Wed, Mar 05, 2003 at 10:15:52AM +0100, Gerd Knorr wrote:
> 
> | > Not sure what is the best idea to fix that.  Don't like the kmalloc
> | > idea that much.  The individual structs are not huge, the real problem
> | > is that many of them are allocated and only few are needed.  Any
> | > chance to tell gcc that it should allocate block-local variables at
> | > the start block not at the start of the function?
> | 
> | Not a particularly clean idea, but maybe creating a union of the
> | structures and putting that on the stack? (ie, doing what GCC should
> | be doing in the first place.)
> 
> That's an idea.  Or make separate called functions for each ioctl and declare
> the structures inside them?

As far as I have seen, at least ds_ioctl uses the union trick. And the
three marked (*) ioctl-functions appear to be suffering from the same
gcc inability.

How much complaining is necessary for the gcc folks to worry about
this?

0xc0ad420b <snd_emu10k1_fx8010_ioctl+3/5ec>:             sub    $0x814,%esp
0xc06dbd77 <v4l_compat_translate_ioctl+3/159c>:          sub    $0x804,%esp
0xc0521e43 <ida_ioctl+3/388>:                            sub    $0x528,%esp
* 0xc01ed733 <presto_ioctl+3/13c4>:                        sub    $0x4d0,%esp
* 0xc0bfbfd3 <br_ioctl_device+3/454>:                      sub    $0x474,%esp
0xc07968bb <megadev_ioctl+3/c94>:                        sub    $0x394,%esp
* 0xc068ff5b <ray_dev_ioctl+3/8b8>:                        sub    $0x2e0,%esp
0xc0583a63 <netdev_ethtool_ioctl+3/e64>:                 sub    $0x2c8,%esp
0xc0865963 <ds_ioctl+3/6b0>:                             sub    $0x2ac,%esp
0xc04370c3 <vt_ioctl+3/1a84>:                            sub    $0x29c,%esp
0xc054c5eb <e1000_ethtool_ioctl+3/6f8>:                  sub    $0x290,%esp
0xc0299b23 <ncp_ioctl+3/13b0>:                           sub    $0x278,%esp
0xc0532e67 <DAC960_UserIOCTL+3/17c0>:                    sub    $0x230,%esp

Jörn

-- 
Optimizations always bust things, because all optimizations are, in
the long haul, a form of cheating, and cheaters eventually get caught.
-- Larry Wall 

  reply	other threads:[~2003-03-05 21:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-05  5:25 Randy.Dunlap
2003-03-05  5:43 ` Andrew Morton
2003-03-05  9:15 ` Gerd Knorr
2003-03-05  9:35   ` Russell King
2003-03-05 15:34     ` Randy.Dunlap
2003-03-05 21:40       ` Jörn Engel [this message]
2003-03-11  4:27       ` Randy.Dunlap
2003-03-11  9:19         ` Gerd Knorr
2003-03-11 16:29           ` Alan Cox
2003-03-11 15:36             ` Daniel Jacobowitz
2003-03-05 11:50   ` mdew
2003-03-05 12:28     ` Gerd Knorr

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=20030305214017.GA25225@wohnheim.fh-wedel.de \
    --to=joern@wohnheim.fh-wedel.de \
    --cc=kraxel@bytesex.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rddunlap@osdl.org \
    --cc=rmk@arm.linux.org.uk \
    /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

all inboxes | Powered by JetHome®