Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 03 Aug 1998 13:45:18 -0700
From:      David Greenman <dg@root.com>
To:        Stefan Eggers <seggers@semyam.dinoco.de>
Cc:        zhihuizhang <bf20761@binghamton.edu>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: Relationship between buf/page/vnode/object? 
Message-ID:  <199808032045.NAA13961@implode.root.com>
In-Reply-To: Your message of "Mon, 03 Aug 1998 12:25:48 %2B0200." <199808031025.MAA09805@semyam.dinoco.de> 

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



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