From owner-freebsd-hackers Fri May 17 01:44:02 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id BAA28095 for hackers-outgoing; Fri, 17 May 1996 01:44:02 -0700 (PDT) Received: from bunyip.cc.uq.oz.au (pp@bunyip.cc.uq.oz.au [130.102.2.1]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id BAA28078 for ; Fri, 17 May 1996 01:43:59 -0700 (PDT) Received: from bunyip.cc.uq.oz.au by bunyip.cc.uq.oz.au id <02706-0@bunyip.cc.uq.oz.au>; Fri, 17 May 1996 18:43:53 +1000 Received: from orion.devetir.qld.gov.au by pandora.devetir.qld.gov.au (8.6.10/DEVETIR-E0.3a) with ESMTP id SAA08067 for ; Fri, 17 May 1996 18:44:28 +1000 Received: by orion.devetir.qld.gov.au (8.6.10/DEVETIR-0.3) id SAA07967; Fri, 17 May 1996 18:40:18 +1000 Date: Fri, 17 May 1996 18:40:18 +1000 From: Stephen McKay Message-Id: <199605170840.SAA07967@orion.devetir.qld.gov.au> To: freebsd-hackers@freebsd.org cc: syssgm@devetir.qld.gov.au Subject: Re: joe's questions on vm/mincore/etc. X-Newsreader: NN version 6.5.0 #1 (NOV) Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Joe Greco wrote: >> something i'd like to have but have not spent time figuring out how to do >> is just directly mmap the ptes for a piece of your own address space. >> Then you don't have to take the hit that mincore requires: >> syscall >> walk ptes >> copyout() >> >> So if anyone out there has mmap'ed their own ptes or knows how, i'm >> listening. > >Oooo we're rapidly diverging from a portable solution now! :-) ;-) > >(I was looking at this in part because it works under at least one other >major OS, SunOS/Solaris, and I run news servers under both environments). At first glance his suggestion looks hideously non-portable, but there is nothing stopping you from writing a system call that does the mapping, and a FreeBSD/i386 specific library routine (called mincore) which gropes the mapped ptes and gives you your answer. Second and subsequent mincore calls would not call the kernel. Thus you keep the published interface and published behaviour, yet have nasty (hopefully fast) code behind the scenes. You could implement that SystemV ipc stuff with these sorts of tricks too, and eject it from the kernel. Anyone for a kernel purity purge? :-) Stephen.