Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Oct 2003 18:43:47 -0400 (EDT)
From:      Jeff Roberson <jroberson@chesapeake.net>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
Subject:   Re: Alignment of disk-I/O from userland. 
Message-ID:  <20031006183611.B99666-100000@mail.chesapeake.net>
In-Reply-To: <26369.1065477317@critter.freebsd.dk>

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

On Mon, 6 Oct 2003, Poul-Henning Kamp wrote:

> In message <200310062146.h96Lkpx0093486@khavrinen.lcs.mit.edu>, Garrett Wollman
>  writes:
>
> >I think that gives us plenary authority to require appropriate
> >alignment of data buffers used to access disk devices directly.
>
> Well, apart from us wedging or botching the request rather than
> return a consistent error we're standards compliant then.
>
> It has been mentioned on #thatchannel that busdma should take care
> of this by copying the request as necessary.  Faced with the prospect
> of a request several megabytes in size, I don't like the prospect
> of malloc/bcopy too much.
>
> All in all, I would advocate that we decide that disks in FreeBSD
> are allowed to return ENXIO if they get insufficiently aligned
> requests.

This could break things like cat, grep, strings, etc. except that they
probably malloc sufficiently large chunks to get their own page, or at
least heavily aligned data due to the properties of power of two
allocators.  I would be awfully sad if we broke the notion of character
devices being regular files though.

How are we going to express the alignment requirements to the upper
layers?  Does busdma provide this now?  If not, do we know which devices
have these requirements?

I think that we should provide the bouncing purely for POLA.  I doubt any
software that ships with FreeBSD will need it so there should be no
performance issues in practice.

>
> --
> 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.
> _______________________________________________
> freebsd-arch@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-arch
> To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031006183611.B99666-100000>