[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    Re: RE: Implementation of mmap() in FreeBSD
From:       Matthew Dillon <dillon () apollo ! backplane ! com>
Date:       1999-06-28 21:22:47
[Download RAW message or body]

:
: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 
					<dillon@backplane.com>



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic