On Mon, Jul 25, 2005 at 10:33:37PM -0400, Bob Rogers wrote: [snip] > > This is sounding more and more like the CMUCL gencgc algorithm, which > uses what I understand is a classic approach. Instead of an IGP list, > it write-protects all oldspace pages (hence my earlier question), > unprotecting them transparently when one is stored into, so that it only > needs to scan writable pages to look for newspace pointers. It is my > intuition that this would be less overhead than an IGP list, but I > suspect this is data-dependent, and would take benchmarking to prove. >
On a POSIX-ish OS, this approach involves a system call to change the protection on each page, plus a signal handler that gets invoked whenever such a page is stored into, and then another system call to unprotect the page. [snip] > > That's OK; if Leo believes it will work, then I'm sure it will. My > quibbles were about speed and complexity, and I don't want to distract > you with unproven assertions about things that might not matter. System calls aren't cheap, and page table manipulations are not necessarilly cheap either. Whether this performance tradeoff is worth it is going to be both OS- and processor-specific. It also lurches into the realm of signal handlers, where POSIX guarantees very little behavior that is portable behavior, but operating systems may allow much more, but the allowed behaviors form an ever-changing and largely disjoint set. In summary, just about any algorithm that avoids page table manipulations and signal handlers is likely to be more portable, and will quite likely be faster. -- Ed M