nvmed: Yield instead of spin when waiting for submission queue item

This commit is contained in:
Jeremy Soller
2022-11-27 09:25:03 -07:00
parent fc4a69ccf9
commit d42f626808
+2 -1
View File
@@ -4,6 +4,7 @@ use std::fs::File;
use std::ptr;
use std::sync::atomic::{AtomicU16, AtomicU64, AtomicUsize, Ordering};
use std::sync::{Mutex, RwLock};
use std::thread;
use crossbeam_channel::Sender;
use smallvec::{smallvec, SmallVec};
@@ -471,7 +472,7 @@ impl Nvme {
return entry;
}
}
unsafe { pause(); }
thread::yield_now();
}
}