Tape block size greater than MAXPHYS
Shivaram Upadhyayula
shivaram.u at quadstor.com
Tue Dec 30 16:39:11 UTC 2014
On Tue, Dec 30, 2014 at 12:01 PM, Kenneth D. Merry <ken at freebsd.org> wrote:
> On Mon, Dec 29, 2014 at 14:52:12 +0530, Shivaram Upadhyayula wrote:
<...>
> One problem that was there before the SI_NOSPLIT changes and is still
> present is that we can't by default read tapes with a large blocksize (e.g.
> 1MB). Increasing MAXPHYS will certainly fix it (assuming your controller
> sets the maxio field in the path inquiry CCB to something sufficiently
> large). I have considered adding a custom read/write routine to the sa(4)
> driver that would essentially take the best available path given the
> requested block size and the constraints imposed by the controller and
> MAXPHYS.
>
> The logic would be something like:
> - If the I/O is <= MAXPHYS (including alignment constraints) and the
> controller supports it, do unmapped I/O.
> - Otherwise, allocate buffers from a sa(4)-specific UMA zone and copy in
> and out. This would allow for doing I/O up to the controller's limit,
> without regard for MAXPHYS. On modern machines, this would also usually
> be faster than mapping the memory in and out of the kernel, because you
> avoid the extra TLB shootdowns.
>
> Ideally we'll get a scheme in place to allow doing unmapped S/G lists at
> some point. But we don't have that yet.
>
> I have some code with logic similar to the above scenario for the pass(4)
> driver asynchronous mode that I has been in my queue to upstream for about
> a year.
Where can the passthrough driver patch be accessed ?
Thanks,
Shivaram
More information about the freebsd-scsi
mailing list