Question about pmap_kenter

James Cook falsifian at falsifian.org
Mon May 24 12:29:16 PDT 2021


I'm trying to understand a bunch of the memory-management code, and
noticed the comment for pmap_kenter() in
sys/platform/pc64/x86_64/pmap.c says:

  *  	NOTE! note that in order for the mapping to take effect -- you
  *  	should do an invltlb after doing the pmap_kenter().

but zget (in vm_zone.c) does not invalidate the TLB after calling it.

In practice pmap_kenter flushes the TLB (that's what pmap_inval_smp
does, right?); I guess that's why it works.

Did I understand the situation correctly? Should zget() and/or the
comment for pmap_kenter be updated so the use is consistent with the
documentation?

-- 
James



More information about the Kernel mailing list