public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Zhu Yi <yi.zhu@intel.com>
Cc: jketreno@linux.intel.com, Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ipw2200 stack reduction
Date: Thu, 29 Dec 2005 10:19:41 +0100	[thread overview]
Message-ID: <20051229091940.GD2772@suse.de> (raw)
In-Reply-To: <1135847228.9670.69.camel@debian.sh.intel.com>

On Thu, Dec 29 2005, Zhu Yi wrote:
> On Wed, 2005-12-28 at 22:29 +0100, Jens Axboe wrote:
> > The reason is the host_cmd structure is large (500 bytes). All other
> > functions currently using ipw_send_cmd() suffer from the same problem.
> > This patch introduces ipw_send_cmd_simple() for commands with no data
> > transfer, and ipw_send_cmd_pdu() for commands with a data payload.
> 
> Hi Jens,
> 
> Thanks for point this out and provide the patch. One comment:
> 
> > +static struct host_cmd *ipw_host_cmd_get(u8 command, u8 len)
> >  {
> > ...
> > +       cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
> 
> This will still alloc 500 bytes for each command. I think if we want to
> dynamically alloc the struct, we can split the struct to head and
> payload and alloc the payload according to the real size.

Well you could do that if you wanted, but 500 bytes of dynamic
allocation is not a big issue. But it could be an optimization on top of
this patch, indeed. The downside is that you then have to do 2
allocations for each command, so whether it would be a win or not I
don't know.

-- 
Jens Axboe


  reply	other threads:[~2005-12-29  9:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-28 21:29 [PATCH] ipw2200 stack reduction Jens Axboe
2005-12-29  8:48 ` Pekka Enberg
2005-12-29  9:00   ` Jens Axboe
2005-12-29  9:07 ` Zhu Yi
2005-12-29  9:19   ` Jens Axboe [this message]
2005-12-29 10:39     ` Pekka Enberg
2005-12-29 11:14       ` Jens Axboe
2005-12-29 11:19         ` Jens Axboe
2005-12-30  5:23           ` Zhu Yi

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=20051229091940.GD2772@suse.de \
    --to=axboe@suse.de \
    --cc=jketreno@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yi.zhu@intel.com \
    /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