From owner-freebsd-hackers Tue Jan 29 18:51:22 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from pintail.mail.pas.earthlink.net (pintail.mail.pas.earthlink.net [207.217.120.122]) by hub.freebsd.org (Postfix) with ESMTP id E565637B405 for ; Tue, 29 Jan 2002 18:51:16 -0800 (PST) Received: from pool0276.cvx40-bradley.dialup.earthlink.net ([216.244.43.21] helo=mindspring.com) by pintail.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 16VkqA-0001oP-00; Tue, 29 Jan 2002 18:51:15 -0800 Message-ID: <3C575F9D.DC8CC325@mindspring.com> Date: Tue, 29 Jan 2002 18:51:09 -0800 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Hyong-Youb Kim Cc: hackers@freebsd.org Subject: Re: another VM question References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hyong-Youb Kim wrote: > First off, for each open file, does the kernel keep a unique vnode > structure? If so, will it have at most one vm_object reference at any > time? Yes and not. It depends on what you mean by "for each open file"; an open instance in user space is not the same thing as an open instance in the kernel space is not the same as an open instance in the system open file table is not the same as an open instance in a device. > I am guessing that mmaping a file will create vm_object with a vnode > pager that references vnode. But then under what circumstances does > vnode not have a valid vm_object? If the file can not be mmap'ed at all because it is in an FS for which there are no getpagesputpages routines, or if the file reference is changed to "deadfs" as a means of revoking access to it, without walking all the possible references, then it won't have a valid vm_object. For example, sockets and FIFOs *can not* have vm_object's. Basically, a vm_object pointer is a reference for the in memory copy of the contents of a backing store. If there is no backing store, and there is no anonymous memory, then there is no vm_object. You would do well to read Matt Dillon's article on the FreeBSD VM system in Daemon News before asking further questions; it will give you a better basis for asking, and answer many questions before you can ask them. > Well ... also ahh what is the difference between VMIO and non-VMIO? Does > the latter just mean that phyio? You can smack my head if these questions > are so dumb. The VMIO means that the I/O is done through the paging system (the VM), rather than via direct I/O. It means that the image is unified, coheremt, and, as a result, may be shared between multiple processes. Really, rea the Daemon News articles; it will let you arrive at your destination much more quickly than asking one or two questions at a time, which then lead to more one or two at a time questions. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message