Date: Fri, 17 May 1996 18:40:18 +1000 From: Stephen McKay <syssgm@devetir.qld.gov.au> To: freebsd-hackers@freebsd.org Cc: syssgm@devetir.qld.gov.au Subject: Re: joe's questions on vm/mincore/etc. Message-ID: <199605170840.SAA07967@orion.devetir.qld.gov.au>
next in thread | raw e-mail | index | archive | help
Joe Greco <jgreco@brasil.moneng.mei.com> 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605170840.SAA07967>