Date: Tue, 7 Oct 2003 09:41:17 -0600 From: Ben Mesander <ben@timing.com> To: "Poul-Henning Kamp" <phk@phk.freebsd.dk> Cc: arch@freebsd.org Subject: Re: Alignment of disk-I/O from userland. Message-ID: <16258.56989.685473.900678@piglet.timing.com> In-Reply-To: <32324.1065508157@critter.freebsd.dk> References: <200310061753.28562.sam@errno.com> <32324.1065508157@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
Poul-Henning Kamp writes: > 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). Ttys, /dev/null and all the > "typical" devices are unaffected. How about a flag for open(2), such as O_DIRECT, which would indicate if the fd in question is such a device, and you did not sufficiently align, etc. your buffers, then you get an error when you attempt the I/O operation. If you did not specify this flag when opening the device, then do the bounce buffer dance for the I/O operation, and lose efficiency. --Ben
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?16258.56989.685473.900678>