Sub-blocking vs cache-line-overwrite (Was Re: RE: RE: [gclist] reference counting)

Nick Barnes Nick.Barnes@pobox.com
Fri, 15 Sep 2000 09:57:24 +0100


At 2000-09-15 05:56:53+0000, Manoj Plakal writes:
> Jeff Sturm wrote (Fri, Sep 15, 2000 at 01:37:28AM -0400) :
> > I'm not really familiar with this capability.  On the other hand,
> > write-allocate seems to be available with Alpha EV6, and I think I heard
> > someone say MIPS and PA-RISC have it too.
> 
>       I think "write-allocate" means that a write miss will allocate 
>       a block in the cache AND fill it with previous contents, as
>       opposed to a write-noallocate which bypasses the cache
>       on a write miss (straight from Hennessy & Patterson, Chap 5).
> 
>       The term we should use is something like "write-allocate-nofill",
>       a write miss will allocate a line but NOT fill it from memory.
>       Which is what the WH64 Alpha instruction does (as a hint).

This discussion reminds me of an operation which would be useful at
the VM level: "I'm no longer interested in the contents of these
pages".  For instance, from-space in a copying collector.  At the VM
level, we can munmap(), but in many cases we want to retain the
address space, but not the contents (e.g. the nursery space following
a nursery collection: we're about to write over it).  The natural
solution at the VM level would be mmap() with a device for "I don't
care what bits I read"; mostly collectors use /dev/zero which is not
free.  There are security considerations here: for security reasons
the OS mustn't allow pages to leak from other processes.  But
/dev/dontcare could be just like /dev/zero, with the potential for
optimizing if pages have just been discarded by the same process.  GCs
could mostly use /dev/dontcare in preference to /dev/zero.

Scott Nettles (Hi, Scott) did this for SML/NJ in the Fox/Venari
projects at CMU in about 1991/2, using the Mach provision for a
user-land pager.  There was a paper.  Any VM hackers want to code this
into *BSD or Linux?

Nick B


--
FreeBSD 2.2.8-RELEASE: up 19 days, 13:03
last reboot Sat Aug 26 21:11 (lightning strike)