Re: How do disk writes work these days?
Re: How do disk writes work these days?
- Subject: Re: How do disk writes work these days?
- From: Wade Tregaskis <email@hidden>
- Date: Sun, 28 Jul 2002 01:12:26 +1000
I don't believe this is the case; writes have pretty much always been
asynchronous, so that unless there is some serious blockage (e.g., out of
buffers), the process can merrily go on its way after making the call
(return happens after the data has been read; there are "edge cases",
involving lots of data, where this doesn't happen, of course).
Exactly write (muahaha) it seems.. :)
Digging through the FreeBSD4.4 design documents, I came across this quote:
"For example, a write system call will copy the data to be written from
the user process to a kernel buffer while the process waits, but will
usually return from the system call before the kernel buffer is written to
the disk."
So it seems that is the authoritative answer, which is what several people
have 'guessed' at. This only begs the question, however, of what would
happen performance-wise if you re-did this as a zero-copy scenario...but
maybe that's just my crazy,
newbie-I-have-no-real-idea-how-hard-this-all-is, kind of thought.. :)
I suppose you couldn't without breaking existing functionality, given apps
still expect to own the data they pass to write functions..
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.