Subject: Re: pmap layer inefficiencies, and possible solutions
To: None <root@ihack.net, tech-kern@netbsd.org>
From: Ross Harvey <ross@teraflop.com>
List: tech-kern
Date: 12/07/1998 13:29:56
> [ in-depth analysis of vm<->pmap interface mainly w.r.t. pv_list ops ]

I would suggest a further idea: instead of requiring each pmap to keep a
pv_list, why not do this on the MI uvm_* side?

Although we could export an apply() function,

	void apply(paddr_t, void (*nextva)(paddr_t, vaddr_t))

it would seem like a better idea would be to simply incorporate per-virtual-
map ops into the MI VM side of the pmap interface.

The VM side could use its existing data structures if they could be quickly
traversed, or actually allocate pv_list objects like we do now: it would
be purely an implementation concern.

Besides the obvious, usual advantages of MI vs MD code, only the MI VM side
knows whether it is safe to sleep, so error recovery is much easier on that
side. Also, this would eliminate the one annoying place where the pmap
module must keep state.

  --Ross Harvey