From owner-freebsd-arch@FreeBSD.ORG Mon Oct 6 15:44:05 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 74B2016A4B3 for ; Mon, 6 Oct 2003 15:44:05 -0700 (PDT) Received: from mail.chesapeake.net (chesapeake.net [208.142.252.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id E822F43F3F for ; Mon, 6 Oct 2003 15:44:03 -0700 (PDT) (envelope-from jroberson@chesapeake.net) Received: from localhost (jroberson@localhost) by mail.chesapeake.net (8.11.6/8.11.6) with ESMTP id h96Mhls06679; Mon, 6 Oct 2003 18:43:47 -0400 (EDT) (envelope-from jroberson@chesapeake.net) Date: Mon, 6 Oct 2003 18:43:47 -0400 (EDT) From: Jeff Roberson To: Poul-Henning Kamp In-Reply-To: <26369.1065477317@critter.freebsd.dk> Message-ID: <20031006183611.B99666-100000@mail.chesapeake.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: arch@freebsd.org cc: Garrett Wollman Subject: Re: Alignment of disk-I/O from userland. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Oct 2003 22:44:05 -0000 X-List-Received-Date: Mon, 06 Oct 2003 22:44:05 -0000 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" >