Den 2023-12-21 kl. 03:59, skrev Jason Thorpe:This should be in rmspace(), where the previous process mappings are removed.That patch looks pretty reasonable, but wouldn’t it be better to invalidate the outgoing range? Generally, best practice is to invalidate a TLB thing when it becomes invalid, rather than when it get a new value.
Together with a check for number of pages affected, so that it wont be an giant TBIA loop :-)
I ended up revising my change to something that's almost exactly the same as Jason's patch from elsethread, though I also had an additional TBIS in pmap_enter() immediately after the call to rmpage(). Am I right to think that this last one isn't needed since there is a TBIA at the end of pmap_enter()?
thanks
kalvis