Unmapped I/O

Jeff Roberson jroberson at jroberson.net
Fri Dec 28 23:23:11 UTC 2012


On Fri, 28 Dec 2012, Poul-Henning Kamp wrote:

> --------
> In message <alpine.BSF.2.00.1212281217570.2005 at desktop>, Jeff Roberson writes:
>
>> 3)  I find the NOTMAPPED negative flag awkward grammatically.  UNMAPPED
>> seems more natural.  Or a positive MAPPED flag would be better.  Minor
>> concern, bikeshedding, etc.
>
> Given that down the road, MAPPED should be the exceptional case, I
> think this should not be a negative option.
>
>> 4)  It would be better to have some wrapper functions around the bio
>> transient map and or sf buf handling.  I will need it to map unmapped cam
>> ccbs in device drivers.  We need to come to some agreement on this API.
>> There should be a fast page-by-page version and a potentially blocking
>> all-at-once linear version.
>
> Do we have credible relevant use-cases for the "map all linear at
> once" case ?
>
> I think it would be better to leave it out, and force those obscure
> (already pessimized) cornercases to deal with page by page, rather
> than have them cramp our style WRT to max I/O size.
>

Well some would require significant stack rewrites.  The usb code, for 
example, assumes linear buffers.  So the usb mass storage driver can 
always run in mapped compat mode.  That's not a high performance case. 
The other place seems to be scsi target code and a few other consumers who 
actually want to poke at the block data.

When we send various scsi commands down like identify and read format etc. 
we always use malloc'd buffers.  For now I think it's safe to leave that 
assumption in place.

The PIO like cases can do page by page pretty easily if we give them a 
nice API.

Thanks,
Jeff


> -- 
> Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
> phk at FreeBSD.ORG         | TCP/IP since RFC 956
> FreeBSD committer       | BSD since 4.3-tahoe
> Never attribute to malice what can adequately be explained by incompetence.
>


More information about the freebsd-arch mailing list