-----Original Message----- From: Kevin Elphinstone Sent: Wednesday, December 10, 2003 8:57 PM To: 'Jonathan S. Shapiro' Cc: 'L4 Hackers List' Subject: RE: Naive question about grant/map
Just a small, but important point relating to the statement below.
The L4 mapping database is NOT strictly a cache, but it can be used to implement cache-like behaviour which is usually what is done in most systems. Kernel mappings are a dynamic subset of things defined at user-level. However, in kernel mapping can be used to indirectly define an address space or region of an address space (if, for example, you what to avoid faults). I.e. it can equal or be a superset of what is defined at user-level. However, doing so requires carefully crafted and coordinated pager
behaviour/protocol.
You can term it a (large) cache with mechanisms to control its population, but it is not exactly a "cache" in the terms usual sense of the word.
This also depends on your point of view. Your statement that the kernel mapping can be a superset of user-level pagers is wrong. The user-level pagers have full knowledge about the replacement policy (since it is implemented in user land via map and unmap) and therefore can rely on the fact that the kernel won't replace entries in the cache. If it would be a superset then the kernel would have to enter values itself.
- Volkmar
Volkmar Uhlig mailto:volkmar@ira.uka.de scribbled on Thursday, 11 December 2003 5:59 PM:
sense of the word.
This also depends on your point of view. Your statement that the kernel mapping can be a superset of user-level pagers is wrong. The user-level pagers have full knowledge about the replacement policy (since it is implemented in user land via map and unmap) and therefore can rely on the fact that the kernel won't replace entries in the cache. If it would be a superset then the kernel would have to enter values itself.
I believe I am not wrong, just mis-interpreted :-). The superset I refer it is where pager effective discards the information required to re-establish the mapping after establishing it and relies on the kernel to hold the only copy, i.e. the kernel posseses a superset of the mapping stored by the pager.
Older versions of sigma0 (maybe the current version too) did not keep track of mappings they handed out, only the fact that a page had been mapped. This is a concrete example of what I meant by a superset. Only the kernel has the actual mapping established and it was lost if a client of sigma zero flushed it.
I'm not arguing that it is a sensible thing to do in all but the most controlled situations (and maybe not there as well), but it can be done.
- Kevin
l4-hackers@os.inf.tu-dresden.de