On Thu, Jun 29, 2006 at 10:21:20AM -0700, David McDaniel wrote: > Being insufficiently familiar with kernel goings-on, I've yet to find the > answer to what someone more familiar may know off the top of the head. > Are the TLB contents saved and restored across context switches? Or > are they simply invalidated and lazily restored upon thread > resumption? Or something altogether different.
It depends on your architecture; for sparc, there are explicit "context IDs" which are associated with a running process; this allows entries for multiple processes to co-exist in the TLB. On amd64, I'm fairly sure that the hardware TLBs have a similar trick, which occurs mostly-behind-the-scenes to the Operating system; the entries are keyed by the address of the root of the page table or something. Cheers, - jonathan -- Jonathan Adams, Solaris Kernel Development _______________________________________________ perf-discuss mailing list perf-discuss@opensolaris.org