Subject: pmap_protect() implementation
To: None <port-mips@netbsd.org>
From: Toru Nishimura <nisimura@itc.aist-nara.ac.jp>
List: port-mips
Date: 03/29/2000 18:53:24
Isn't it ridiculous pmap_protect() does following, is it?
while (sva < eva) {
...
pte = ...
for (; sva < nssva; sva += NBPG, pte++) {
entry = pte->pt_entry;
if (!mips_pg_v(entry))
continue;
entry = (entry & ~(mips_pg_m_bit() |
mips_pg_ro_bit())) | p;
pte->pt_entry = entry;
...
MachTLBUpdate(sva | asid, entry);
}
}
When pmap_protect() is called by uvmspace_fork1(), code above fills a
bunch of entries into TLB which has only the capacity of 56, I think.
Tohru Nishimura