public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Gerd Knorr <kraxel@bytesex.org>
To: "Randy.Dunlap" <rddunlap@osdl.org>
Cc: rmk@arm.linux.org.uk, linux-kernel@vger.kernel.org
Subject: Re: reducing stack usage in v4l?
Date: Tue, 11 Mar 2003 10:19:34 +0100	[thread overview]
Message-ID: <20030311091934.GB20721@bytesex.org> (raw)
In-Reply-To: <33000.4.64.238.61.1047356833.squirrel@www.osdl.org>

> > That's an idea.  Or make separate called functions for each ioctl and
> > declare the structures inside them?
> 
> and this method looks like a possibility.
> 
> Gerd, Andrew says that the kmalloc() time will be small compared to
> the memset()'s that the function is already doing.

That is wrong, at least the 2k memset/call mentioned by Andrew.  There
are lots of memset() calls, but they all are within the case switches
for the ioctls and zero out only the structs which are used in that code
path, so it is actually much smaller (~50 -> ~300 bytes maybe, depending
on the ioctl).

> Do you want to do anything about this, or want me to, or want me
> to drop it?

It is on my todo list, just havn't found yet the time to do that.
Probably I'll split it into smaller functions, this looks like the
best way to me.

  Gerd


  reply	other threads:[~2003-03-11  9:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-05  5:25 reducing stack usage in v4l? 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
2003-03-11  4:27       ` Randy.Dunlap
2003-03-11  9:19         ` Gerd Knorr [this message]
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=20030311091934.GB20721@bytesex.org \
    --to=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