Date: Fri, 10 Nov 1995 10:48:38 -0800 (PST) From: John Dyson <dyson> To: rminnich@Sarnoff.COM (Ron G. Minnich) Cc: lm@slovax.engr.sgi.com, hackers@freebsd.org, waa@aurora.cis.upenn.edu, deraadt@theos.com, chuck@maria.wustl.edu Subject: Re: larry: you might want to add this to lmbench (but i'm not sure) Message-ID: <199511101848.KAA06850@freefall.freebsd.org> In-Reply-To: <Pine.SOL.3.91.951110110255.13530A-100000@morse> from "Ron G. Minnich" at Nov 10, 95 11:15:34 am
next in thread | previous in thread | raw e-mail | index | archive | help
> > this program does a very simple thing: > 1) open a file > 2) call write with an invalid address, viz: > write(fd, x, 5); > where x is (void *) 0x40000000 > > it does this as many times as you ask. What it's measuring is correlated > to the raw performance of the system's ability to look up a vm region or > segment or object given a virtual address. It is not a pure measure, > since systems that do a lot of work before checking the arguments > (freebsd) will fare worse than systems that just check the arguments up > front for validity (linux). On the other hand, all the system calls that > happen a lot have to do this operation, so you probably want this type of > thing to be fast. > > Numbers ( i just do wall clock time, since to first order it's all system) > linux, p100, 3.8 seconds > Irix, 150 Mhz. r4600 63 seconds > Solaris, 66 Mhz. sparc-20 68 seconds > FreeBSD, p90 290 seconds > You have found one of FreeBSD's VM's dark secrets!!! Not only does FreeBSD wait for the invalid page fault to occur -- it also creates and destroys the page table page that whould have covered that address!!! That was a design decision to get rid of useless page table pages as quickly as possible. Tell me, what is the best thing to do in this case? My opinion is to make the common case quick -- depend on page faults to handle the exceptional condition. The reason that page-table-pages are freed quickly is that it makes more memory available (and I have some benchmarks that do evil things on the original Mach VM system when you don't free the page table pages :-)). A bit of restucturing could elimination the creation/deletion of the page table page though. (note that page table pages are demand-zeroed -- lots of bzero time!!!) Does this slow things down running real applications? If it does, I'll fix it. This DOES NOT reflect the actual pagefault time however (about 60-90usecs on a 486/66), because of the continual bezeroing the page-table-page. Let me know (anyone) what you think !!! John dyson@freebsd.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199511101848.KAA06850>