I haven't looked recently, but IIRC each read() call regenerates *all*
of the information in the file. A buffered read of a file <= PAGE_SIZE
would therefore normally be atomic, because the kernel can't normally be
preempted while the page is being filled.
Conceivably a file in /proc could contain data which would take some
time to collect, and which therefore might cause the kernel to
reschedule while e.g. waiting for disk I/O. I wouldn't expect device
information to be in this group, although process information might.
--
brandon s. allbery os/2,linux,solaris,perl allbery@kf8nh.apk.net
system administrator kthkrb,heimdal,gnome,rt allbery@ece.cmu.edu
carnegie mellon / electrical and computer engineering kf8nh
We are Linux. Resistance is an indication that you missed the point.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/