mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-26 10:53:25 +00:00
Improve efficiency of global TLB flushing
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
720b952996
commit
99a22ff124
@ -101,16 +101,6 @@ pub(super) struct Vmar_ {
|
||||
parent: Weak<Vmar_>,
|
||||
}
|
||||
|
||||
impl Drop for Vmar_ {
|
||||
fn drop(&mut self) {
|
||||
let mut cursor = self
|
||||
.vm_space
|
||||
.cursor_mut(&(self.base..self.base + self.size))
|
||||
.unwrap();
|
||||
cursor.unmap(self.size);
|
||||
}
|
||||
}
|
||||
|
||||
struct VmarInner {
|
||||
/// Whether the vmar is destroyed
|
||||
is_destroyed: bool,
|
||||
@ -295,12 +285,7 @@ impl Vmar_ {
|
||||
if !self.is_root_vmar() {
|
||||
return_errno_with_message!(Errno::EACCES, "The vmar is not root vmar");
|
||||
}
|
||||
let mut cursor = self
|
||||
.vm_space
|
||||
.cursor_mut(&(self.base..self.base + self.size))
|
||||
.unwrap();
|
||||
cursor.unmap(self.size);
|
||||
drop(cursor);
|
||||
self.vm_space.clear();
|
||||
let mut inner = self.inner.lock();
|
||||
inner.child_vmar_s.clear();
|
||||
inner.vm_mappings.clear();
|
||||
|
Reference in New Issue
Block a user