Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Dec 2012 13:22:48 -1000 (HST)
From:      Jeff Roberson <jroberson@jroberson.net>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        Konstantin Belousov <kostikbel@gmail.com>, arch@freebsd.org
Subject:   Re: Unmapped I/O
Message-ID:  <alpine.BSF.2.00.1212281320250.2005@desktop>
In-Reply-To: <48513.1356734595@critter.freebsd.dk>
References:  <20121219135451.GU71906@kib.kiev.ua> <alpine.BSF.2.00.1212281217570.2005@desktop> <48513.1356734595@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help

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

> --------
> In message <alpine.BSF.2.00.1212281217570.2005@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@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.
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1212281320250.2005>