From owner-freebsd-arch@FreeBSD.ORG Mon Oct 6 23:54:58 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 C275C16A4B3 for ; Mon, 6 Oct 2003 23:54:58 -0700 (PDT) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1D17943FBD for ; Mon, 6 Oct 2003 23:54:57 -0700 (PDT) (envelope-from grog@lemis.com) Received: from blackwater.lemis.com (blackwater.lemis.com [192.109.197.80]) by ozlabs.org (Postfix) with ESMTP id 3485B2BC0D for ; Tue, 7 Oct 2003 16:54:54 +1000 (EST) Received: by blackwater.lemis.com (Postfix, from userid 1004) id 38CF551836; Tue, 7 Oct 2003 16:24:51 +0930 (CST) Date: Tue, 7 Oct 2003 16:24:51 +0930 From: Greg 'groggy' Lehey To: Poul-Henning Kamp Message-ID: <20031007065451.GE47054@wantadilla.lemis.com> References: <200310061753.28562.sam@errno.com> <32324.1065508157@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="QXAv++6zoyBcX2gv" Content-Disposition: inline In-Reply-To: <32324.1065508157@critter.freebsd.dk> User-Agent: Mutt/1.4i Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 cc: Sam Leffler cc: arch@freebsd.org 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: Tue, 07 Oct 2003 06:54:58 -0000 --QXAv++6zoyBcX2gv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tuesday, 7 October 2003 at 8:29:17 +0200, Poul-Henning Kamp wrote: > In message <200310061753.28562.sam@errno.com>, Sam Leffler writes: >> On Monday 06 October 2003 04:11 pm, Poul-Henning Kamp wrote: >>> In message <20031006163218.L55190@pooker.samsco.home>, Scott Long writes: >> ...stuff deleted... >>>> As for returning an error code for a buffer that we (arbitrarily) believe >>>> to be too big to align, [...] >>> >>> I have never advocated returning an error based on "alignment and size", >>> only based on alignment alone. >> >> Imposing this restriction is a major semantic change that I consider a very >> bad idea. You are basically imposing the semantics of O_DIRECT on all i/o >> operations going to a device. I think it is important to give best effort to >> support unaligned operations `by default. I can imagine restricting this to >> some upper size bound but existing applications, regardless of how well you >> consider them to be written, must continue to work. > > Now now, you are missing two of the finer points: > > 1: Not "on all i/o operations going to a device", but rather "on i/o > operations which take the physread/write fast-path to avoid a copyin/out > overhead." (disks and tapes mostly). Ah. That's a whole different story. > Ttys, /dev/null and all the "typical" devices are unaffected. This is what I thought you meant at first, but your example using stdin suggested differently. Yes, that's not such a serious restriction. > 2: Right now we _do_ impose this restriction, but our > error-reporting is wildly inaccurate. And this is a pretty good indication that we're not going to break a lot of things with it. If this only applies to special devices, I don't see a problem with it. Greg -- See complete headers for address and phone numbers. --QXAv++6zoyBcX2gv Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.0 (FreeBSD) iD8DBQE/gmM7IubykFB6QiMRAvO9AJ4uNuXIv8e9agMhJrguUCfG4AmP/ACgnL6G azbAbdTwu+3gjjIIDsEbjrs= =NDyj -----END PGP SIGNATURE----- --QXAv++6zoyBcX2gv--