[lkml]   [2005]   [Dec]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] ipw2200 stack reduction
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

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-12-29 10:20    [W:0.044 / U:5.944 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site