mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-17 08:40:52 +00:00
remove some redundant mmu flush commands
The double-flush in activate() has a big impact on performance, and I'm pretty sure it only needs to happen after the SATP update not before, at least architecturally. Eliminating the extra flush improves the fast message passing benchmark time by 9%.
This commit is contained in:
parent
c590184096
commit
25f7bd6f52
2 changed files with 2 additions and 2 deletions
|
|
@ -258,7 +258,7 @@ impl MemoryMapping {
|
|||
/// As such, this will only have an observable effect once code returns
|
||||
/// to userspace.
|
||||
pub fn activate(self) -> Result<(), xous_kernel::Error> {
|
||||
unsafe { flush_mmu() };
|
||||
// unsafe { flush_mmu() }; // redundant - adds 9% time to context switch benchmark when present!
|
||||
satp::write(self.satp);
|
||||
unsafe { flush_mmu() };
|
||||
Ok(())
|
||||
|
|
|
|||
|
|
@ -431,7 +431,7 @@ impl Swap {
|
|||
true,
|
||||
)
|
||||
.ok();
|
||||
unsafe { crate::arch::mem::flush_mmu() };
|
||||
// unsafe { crate::arch::mem::flush_mmu() }; // redundant?
|
||||
} else {
|
||||
already_mapped = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue