Re: [PATCH 03/13] scsi: unify allocation of scsi command and sense buffer



On Mon, May 25, 2009 at 09:46:47AM +0200, Jens Axboe wrote:
But that patch looks good to me, avoiding one allocation for each
command and simplifying the code. I try to remember why these were
two slabs to start with but can't find any reason.

Btw, we might just want to declare the sense buffer directly as a sized
array in the scsi command as there really doesn't seem to be a reason
not to allocate it.

That is also a workable solution. I've been trying to cut down on the
number of allocations required per-IO, and there's definitely still some
low hanging fruit there. Some of it is already included, like the inline
io_vecs in the bio.

Btw, one thing I wanted to do for years is to add ->alloc_cmnd and
->destroy_cmnd method to the host template which optionally move the
command allocation to the LLDD. That way we can embedd the scsi_cmnd
into the drivers per-commad structure and eliminate another memory
allocation. Also this would naturally extend the keep one cmnd pool
to drivers without requiring additional code. As a second step it
would also allow killing the scsi_host_cmd_pool byt just having
a set of library routines that drivers which need SLAB_CACHE_DMA can
use.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [PATCH 03/13] scsi: unify allocation of scsi command and sense buffer
    ... allocation and free per command. ... Might help to send it to linux-scsi to get people to review and apply it ... command and simplifying the code. ... two slabs to start with but can't find any reason. ...
    (Linux-Kernel)
  • Re: SCSI breakage on non-cache coherent architectures
    ... and they're expensive in the allocation (at 96 ... There's no reason we have to allocate and free that amount of ... space with every command. ...
    (Linux-Kernel)
  • Re: [PATCH 03/13] scsi: unify allocation of scsi command and sense buffer
    ... But that patch looks good to me, avoiding one allocation for each ... command and simplifying the code. ... two slabs to start with but can't find any reason. ...
    (Linux-Kernel)
  • Re: how to match parenthesis in sed
    ... BTW, for some reason, the following does not work: ... The output of the above command has a new line before each parenthesis. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
    (Debian-User)
  • Accesing structures data (getting lengthy!)
    ... > assignment statement just won't stand out amongst all the other ... > meaningless dummy variables that you have to keep track of. ... > comparitively easy to pick out of a long, boring, command line history, ... > original, for some reason, wraps me up in knots. ...
    (comp.soft-sys.matlab)