Re: Alignment of disk-I/O from userland.
From: Garrett Wollman (wollman_at_khavrinen.lcs.mit.edu)
Date: 10/06/03
- Previous message: Luigi Rizzo: "Re: Alignment of disk-I/O from userland."
- In reply to: Poul-Henning Kamp: "Alignment of disk-I/O from userland."
- Next in thread: Poul-Henning Kamp: "Re: Alignment of disk-I/O from userland."
- Reply: Poul-Henning Kamp: "Re: Alignment of disk-I/O from userland."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 6 Oct 2003 17:46:51 -0400 (EDT) To: phk@phk.freebsd.dk
PHK writes:
>Most code which does disk I/O from userland uses malloc'ed buffers for
>the sectors and the alignment comes for free, but we currently have
>no requirement that it be so.
I believe that the Standard allows practically arbitrary restrictions
on what may be done with devices (since most devices, aside from ttys,
are outside the scope of the Standard anyway). It says that read()
may fail if:
[ENXIO] A request was made of a nonexistent device, or the request
was outside the capabilities of the device.
(I'm assuming you're talking about reads from devices, as opposed to
reads from files.)
I think that gives us plenary authority to require appropriate
alignment of data buffers used to access disk devices directly.
-GAWollman
_______________________________________________
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"
- Previous message: Luigi Rizzo: "Re: Alignment of disk-I/O from userland."
- In reply to: Poul-Henning Kamp: "Alignment of disk-I/O from userland."
- Next in thread: Poul-Henning Kamp: "Re: Alignment of disk-I/O from userland."
- Reply: Poul-Henning Kamp: "Re: Alignment of disk-I/O from userland."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|