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

From: Boaz Harrosh
Date: Tue May 26 2009 - 12:28:34 EST


On 05/26/2009 07:12 PM, Boaz Harrosh wrote:
> On 05/26/2009 05:47 PM, James Bottomley wrote:
>> There are several other approaches:
>>
>> 1. Keep the sense buffer packed in the command but disallow DMA to
>> it, which fixes all the alignment problems. Then we supply a
>> set of rotating DMA buffers to drivers which need to do the DMA
>> (which isn't the majority).
>
> This one is not possible because it is scsi-ml in majority of cases that
> does the DMA request through scsi_eh_prep_cmnd() and a regular read.
> The drivers don't even know anything about it.
>

I retract that no, yes and scsi-ml is one more possible client of
the "rotating DMA buffers"

>> 2. Sense is a comparative rarity, so us a more compact pooling
>> scheme and discard sense for reuse as soon as we know it's not
>> used (as in at softirq time when there's no sense collected).
>>
>
> This is the way to go for sure. And only on ARCHs with none-coherent-cache
> all the good ARCHs can just use embedded sense just fine.
>
>> I'd need a little more clarity on the actual size of the problem before
>> making any choices.
>>
>> The other thing to bear in mind is that two allocations of M and N might
>> be more costly than a single allocation of N+M; however, an allocation
>> of M+N+extra can end up more costly if the extra causes more page
>> reclaim before we get an actual command.
>>
>> James
>>
> Boaz
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at http://vger.kernel.org/majordomo-info.html

--
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/