* Re: command emulation fix
[not found] ` <20170119203458.GC25390@mtj.duckdns.org>
@ 2017-01-19 20:40 ` Christoph Hellwig
0 siblings, 0 replies; only message in thread
From: Christoph Hellwig @ 2017-01-19 20:40 UTC (permalink / raw)
To: Tejun Heo; +Cc: linux-ide, martin.petersen, linux-scsi
On Thu, Jan 19, 2017 at 03:34:58PM -0500, Tejun Heo wrote:
> So, unless we allocate one mempool per port, we're gonna have to
> synchronize around its use anyway. mempool can't guarantee allocation
> to multiple users at the same time. If this is something which
> affects scalability, I'm completley fine with making it per-port (or
> device). Each ata_port carries 512 byte buffer anyway. Maybe we can
> reuse that?
I'll play around with these things a bit more. For the slow
path ops I think I can get away without any dynamic allocation
at all - just use small on-stack buffers.
For DSM / Write Same we rewrite into the buffer the SCSI layer
provided us. This is a bit of an issue anyway as this might
modify user data that is not expected to be rewritten or even
mapped read-only. Maybe we need to kill off that emulation
entirely and just have ATA DSM using the ATA_16 CDB as another
provisioning option in sd.c. While that is a bit of a layering
violation it would solve a lot of problems with the way TRIM
is currently implemented.
^ permalink raw reply [flat|nested] only message in thread