tech-kern archive

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

Re: pmap_kenter_pa & pmap_kremove



On Sat, Feb 22, 2014 at 10:04:13PM +0000, Mindaugas Rasiukevicius wrote:
> Matt Thomas <matt%3am-software.com@localhost> wrote:
> > 
> > I've been wondering...
> > 
> > Should pmap_kenter_pa overwrite an existing entry should it be operating
> > on an unmapped VA.
> 
> You mean already mapped VA?
> 
> > I think that if you want to change a mapping, you
> > should do a pmap_kremove first.
> 
> I tend to agree.  I have not seen a need for such re-mapping (overwriting),
> but even if there is, it can be done efficiently by removing, entering and
> then calling pmap_update().  With the deferred update, that would result in
> a single TLB flush/invalidation.

Anything that uses a small KVA area to reference a large amount of
physical addresses?

I'd guess that you'd want a flag somewhere to know it was likely
(either for the call, but probably a property of the KVA address.

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index