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

Re: [f-cpu] TLB design



> In HW TLB we usually use the invalid entry to store info about where
> the page is stored in mass storage, so the exception can retrieve quickly
> some info. Much more helpful than you think. I used to leave the invalid
> physical address so i can transform it to an index and examine the associated
> info to check if is active or inactive (that is content is in fact swapped on
> external storage)...
 
> > For me, you don't have enough entry into the TLB to say that some of them
> > are mapped to disk, and on rescent computer the swap are not so much use
> > (database program prefer to have their own save polici).
 
> It is why i'm unsure about the necessity for this bit with a SW TLB.

I think it clearly an overkill, because you really need space in your TLB, and
by puting TLB entry that "map to disk" you loose entry in TLB and complexify
your TLB miss handler.
 
> No, for COW, we just need to fix it as read-only. When writing on a
> read-only page, we apply a COW if we know this page allows it.
> 
> When you mapped a file on memory and you modify this memory and you
> declared the mapping so that any change of memory must be replicated in file,
> well you could use this bit to tell us if you must update this page in file
> before discarding this TLB entry for another one. Without this bit you are
> unable to know if this page was modified and so to update the file. Your
> mmap (unix) would be very unefficient because it would be forced to rewrite
> all the memory in the file since it would be unable to know which pages
> have been modified.
 
> I think that kind of bit is not as expensive to have it.

Ok, I now understand why you want this bit, and it can be useful. 


Cedric
*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/