[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Power Management et. al.



On Thu, Apr 19, 2001 at 03:44:24PM -0800, Ethan Benson wrote:
> >  To have a central macos image, you just need to mmap( ..., MAP_PRIVATE, ),
> > so your changes are made copy-on-write.  (You might want to do this within
> > the program instead of leaving it to the kernel, so you could write changes
> > to disk instead of leaving them in memory.  I don't know how well Linux's VM
> > would handle the situation, but if you had lots of swap space things should
> > work :)
> 
> this part is beyond me it should be possible somehow but i wouldn't
> know how.  

 I'm not sure how to do it in software either, but you'd need a data
structure you could check to see if you should go to the original file, or
the private temp file.  I guess you could just have a bitmap, 1 bit per page.
Hardware MMUs are nice, though :)

 Another problem with mmaping the whole disk image is that it might be bigger
than the virtual address space, which would be a problem.  This kind of
stuff is where 64 bit addresses really come in handy.  Also, the TLB hit
rate would probably go way down with so much virtual memory being thrown
around.  (you need a TLB entry for each page, IIRC.)  OTOH, doesn't PPC allow 
big pages or something?  I'm pretty sure you can set up mapping for big
sections of memory, with block address translation stuff, but the kernel
probably doesn't try to use these for big mmap()s.  


-- 
#define X(x,y) x##y
Peter Cordes ;  e-mail: X(peter@llama.nslug. , ns.ca)

"The gods confound the man who first found out how to distinguish the hours!
 Confound him, too, who in this place set up a sundial, to cut and hack
 my day so wretchedly into small pieces!" -- Plautus, 200 BCE



Reply to: