From owner-freebsd-hackers Mon Aug 3 13:48:38 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA05815 for freebsd-hackers-outgoing; Mon, 3 Aug 1998 13:48:38 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from implode.root.com (implode.root.com [198.145.90.17]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA05747 for ; Mon, 3 Aug 1998 13:48:24 -0700 (PDT) (envelope-from root@implode.root.com) Received: from implode.root.com (localhost [127.0.0.1]) by implode.root.com (8.8.5/8.8.5) with ESMTP id NAA13961; Mon, 3 Aug 1998 13:45:18 -0700 (PDT) Message-Id: <199808032045.NAA13961@implode.root.com> To: Stefan Eggers cc: zhihuizhang , freebsd-hackers@FreeBSD.ORG Subject: Re: Relationship between buf/page/vnode/object? In-reply-to: Your message of "Mon, 03 Aug 1998 12:25:48 +0200." <199808031025.MAA09805@semyam.dinoco.de> From: David Greenman Reply-To: dg@root.com Date: Mon, 03 Aug 1998 13:45:18 -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >Thus the vnode of a regular file has an associated vm_object (which is >the same as long as at least one reference to this vnode exists) and >every time you reference the file you do it with its vnode. It >doesn't matter if it is a read() or a mmap(), all references to it go >through the vnode's vm_object and use the functions in vnode_pager.c. > >I hope it got a bit clearer by this how the whole thing works. And I >also hope that I don't wrote too much nonsense - I just started >reading about this in the code yesterday night. ;-) Correct. We continue to use struct bufs because we still need to map the file pages into the kernel virtual address space (for copyin/copyout), and struct bufs are convenient for that. It was also easiest to keep this abstraction in the filesystem code; it minimized the amount of change that was necessary, made it fairly easy to port things like soft-updates, and has other benefits as well such as controlling the amount of delayed-write data to a reasonable level. -DG David Greenman Co-founder/Principal Architect, The FreeBSD Project To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message