From owner-freebsd-hackers Fri Jun 22 7:57:19 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from harrier.mail.pas.earthlink.net (harrier.mail.pas.earthlink.net [207.217.121.12]) by hub.freebsd.org (Postfix) with ESMTP id 5D74C37B401 for ; Fri, 22 Jun 2001 07:57:13 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from mindspring.com (dialup-209.244.104.237.Dial1.SanJose1.Level3.net [209.244.104.237]) by harrier.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id HAA25050; Fri, 22 Jun 2001 07:57:10 -0700 (PDT) Message-ID: <3B335CE6.E7E02938@mindspring.com> Date: Fri, 22 Jun 2001 07:57:42 -0700 From: Terry Lambert Reply-To: tlambert2@mindspring.com X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Zhihui Zhang Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Confusion with mknod() and devfs 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 Zhihui Zhang wrote: > According to the red daemon book, alias vnodes are used to make cache > coherent (vp as a key). But getblk() stuff does not seem to check it. > This makes me feel the code is there for historical reasons. The "BSD 4.4" book was written about a system without a unified VM and buffer cache. The aliases it is talking about are the buffers hung off a file vnode and the buffers hung off a device vnode, from which that file was being read. The reason getblk() doesn't check it is that the cache is maintained as coherent, so there's no need, since the check is intended to permit explicit coherency operations to take place, when necessary. There is a lot of "missing" code you aren't seeing that is referenced by the book. It is still possible to create aliases, but they are done by having multiple vm_object_t's pointing to the same data blocks as backing objects. This only occurs in the case of stacking VFS's with a non-trivial relationship (e.g. where the backing object contents would not be the same between layers). It can also occur to some small extent in the NFS client FS case. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message