summaryrefslogtreecommitdiff
path: root/sys/src/9/pc/mmu.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2019-12-07 02:13:51 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2019-12-07 02:13:51 +0100
commit28836f3ff593f729a9dc92b67a6f99382bc84c28 (patch)
tree9c74bfd8e19ba2f8d6ccf39aeaf716adb367a0f9 /sys/src/9/pc/mmu.c
parent480d7b8f5f0ccb52391c41ffa58c196618827346 (diff)
kernel: avoid useless mmu flushes, implement better wait condition for procflushmmu()
procflushmmu() returns once all *OTHER* processors that had matching processes running on them flushed ther tlb/mmu state. the caller of procflush...() takes care of flushing "up" by calling flushmmu() later. if the current process matched, then that means m->flushmmu would be set, and hzclock() would call flushmmu() again. to avoid this, we now check up->newtlb in addition to m->flushmmu in hzclock() before calling flushmmu(). we also maintain information on which process on what processor to wait for locally, which helps making progress when multiple procflushmmu()'s are running concurrently. in addition, this makes the wait condition for procflushmmu() more sophisticated, by validating if the processor still runs the selected process and only if it matchatches, considers the MACHP(nm)->flushmmu flag.
Diffstat (limited to 'sys/src/9/pc/mmu.c')
0 files changed, 0 insertions, 0 deletions