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

From: FUJITA Tomonori
Date: Tue May 26 2009 - 01:24:26 EST


On Mon, 25 May 2009 12:28:01 +0300
Boaz Harrosh <bharrosh@xxxxxxxxxxx> wrote:

> On 05/25/2009 10:30 AM, Jens Axboe wrote:
> > Fold the sense buffer into the command, thereby eliminating a slab
> > allocation and free per command.
> >
> > Signed-off-by: Jens Axboe <jens.axboe@xxxxxxxxxx>
>
> Jens Hi.
>
> I'm "TO:" this to Tomo.
>
> This is the way it used to be for a long time. It was only recently changed by
> Tomo because of a bug on none-cache-coherent arches that need to dma-access the
> sense_buffer and also on the other hand change scsi_cmnd members by CPU.
>
> In my opinion all you need is an __aligned(SMP_CACHE_BYTES) declaration at
> sense_buffer[] and let there be a hole at the end before the array. But Tomo
> did not like that, so he separated the two.

IIRC, it was not my opinion :) I don't think that putting
CACHE_ALIGNMENT here is a good idea though.

If this separated sense buffer allocation actually hurts the
performance, then I prefer the ->alloc_cmnd and ->destroy_cmnd hook
idea. Then most of llds are happy about the current sense buffer
scheme and some can use ->alloc_cmnd and ->destroy_cmnd hooks for the
better performance.
--
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/