Subject: Invalidating TLB selectively on i486.
To: None <current-users@sun-lamp.CS.Berkeley.EDU>
From: Jan-Oliver Neumann <jan@encap.Hanse.DE>
List: current-users
Date: 04/09/1994 18:35:31

I just had the following idea: allocbuf() calls pagemove() to steal physical
memory pages from ununsed buffers. As the maximum buffer size is 8192 bytes
and the pagesize of the i386 is 4096 bytes, it has to reallocate one page
of memory. This means pagemove() has to modify to PTEs. If I didn't make
an error here, I think it would be worth on i486's to flush the TLB select-
ively with the INVLPG instruction instead of reloading cr3 and thus invali-
dating the whole TLB with tlbflush(). Invalidating this two PTEs in this
very situtation costs 24 CPU cycles but leaves the rest of the TLB valid.

I think this could improve performance in cases of heavy io. What do the
experts think about it ?