:
:By converge, I mean VOP_GETPAGES() and VOP_PUTPAGES() will call VOP_READ()
:and VOP_WRITE() just as read() and write() system call.
Yes, but what they are doing is mapping the VMIO cache pages into the
buffer, so the VOP_READ/VOP_WRITE essentially operates directly on the
VMIO cache pages. This is why NOCOPY is set -- because there is no need
to copy the data from the buffer to the VMIO cache because the buffer IS
the VMIO cache at that point in time. Confusing, eh?
A normal read() or write() syscall always copies the data, because the
uio buffer in that case is not VMIO cache but instead some location in
the processor's memory. Even if this location were associated with an
mmap(), it would almost certainly be to a different file so the copy must
occur anyway.
A lot of the apparent confusion in the code is due to the fact that the
code did not originally implemented a unified buffer cache. It is being
slowly cleaned up.
:-Zhihui
-Matt
Matthew Dillon
<[EMAIL PROTECTED]>
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message