Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Jun 1999 14:22:47 -0700 (PDT)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Zhihui Zhang <zzhang@cs.binghamton.edu>
Cc:        "Daniel J. O'Connor" <darius@dons.net.au>, freebsd-hackers@FreeBSD.ORG, Ladavac Marino <mladavac@metropolitan.at>
Subject:   Re: RE: Implementation of mmap() in FreeBSD
Message-ID:  <199906282122.OAA24829@apollo.backplane.com>
References:   <Pine.GSO.3.96.990628155136.20491B-100000@sol.cs.binghamton.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
:
: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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199906282122.OAA24829>