From owner-freebsd-current Tue May 27 10:27:50 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id KAA23591 for current-outgoing; Tue, 27 May 1997 10:27:50 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.50]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id KAA23568 for ; Tue, 27 May 1997 10:27:36 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id KAA15619; Tue, 27 May 1997 10:23:31 -0700 From: Terry Lambert Message-Id: <199705271723.KAA15619@phaeton.artisoft.com> Subject: Re: Weird behaviour from the Linux emulator To: msmith@atrad.adelaide.edu.au (Michael Smith) Date: Tue, 27 May 1997 10:23:31 -0700 (MST) Cc: roberto@keltia.freenix.fr, freebsd-current@FreeBSD.ORG In-Reply-To: <199705270615.PAA28391@genesis.atrad.adelaide.edu.au> from "Michael Smith" at May 27, 97 03:45:41 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > I understand the need to shadow the real filesystem but it should be done > > only for the search for libraries/binaries, not for every open(2) call. > > Aha. And how do you think that libraries/binaries are searched for, if > not by open(2)? Then how about configuration files, hmm? Binaries are searched by execve(), of course; it's possible to distinguish a file being opened for read from one being opened for execution. This is the basis for my argument for an option for prefaulting to swap on a remote file system load of an executable so that my client machines don't hang when my NFS server is being rebooted. As far as shared libraries go, they can be faulted the same way when an mmap() with the PROT_EXEC flag occurs. For shared libraries, this is before the crt0.o code calls _main in the first place. For dlopen(), well, you take your chances (like you currently do anyway) and you recommend in the man page that the open occur as soon as possible to trigger the fault to swap. Regards, Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.