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

Re: [f-cpu] TLB design



> > > 	- used bit (indicating that the page has been accessed)
> > Why not a counter ? I currently don't see how the OS can make it's decision
> > about how to remove a TLB entry if TLB is full.
>
> A counter would be more expensive (and would take more bits).
>
> The OS will have to scan (and reset) the `used' bits on a regular basis
> (e.g. inside a (slow) timer interrupt) and record the entries that have
> been used. The entry that has been used least recently can be replaced.

Counter is not useable. It is because you often got multiple accesses
in burst and this would make it overflow quicly. Rather you need to
count these burst to get LFU replacement strategy which is emulated
in 2.4.10 and latest BSDs.
What would help and what is pain in current linux mm is timestamp of
last access. But yes - it is unfortunately space expensive.
devik


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