Merge 'io/linux: make syscallio the default (io_uring is really slow)' from Jussi Saurio

context: https://github.com/tursodatabase/limbo/issues/1275

Reviewed-by: Pere Diaz Bou <pere-altea@homail.com>

Closes #1295
This commit is contained in:
Jussi Saurio
2025-04-10 13:55:06 +03:00
3 changed files with 4 additions and 4 deletions

View File

@@ -43,7 +43,7 @@ impl Default for Io {
true => {
#[cfg(all(target_os = "linux", feature = "io_uring"))]
{
Io::IoUring
Io::Syscall // FIXME: make io_uring faster so it can be the default
}
#[cfg(any(
not(target_os = "linux"),

View File

@@ -89,12 +89,12 @@ impl Database {
path: &str,
vfs: &str,
) -> crate::Result<(Arc<dyn IO>, Arc<Database>)> {
use crate::{MemoryIO, PlatformIO};
use crate::{MemoryIO, SyscallIO};
use dynamic::get_vfs_modules;
let io: Arc<dyn IO> = match vfs {
"memory" => Arc::new(MemoryIO::new()),
"syscall" => Arc::new(PlatformIO::new()?),
"syscall" => Arc::new(SyscallIO::new()?),
#[cfg(all(target_os = "linux", feature = "io_uring"))]
"io_uring" => Arc::new(UringIO::new()?),
other => match get_vfs_modules().iter().find(|v| v.0 == vfs) {

View File

@@ -190,7 +190,7 @@ cfg_block! {
#[cfg(feature = "fs")]
pub use unix::UnixIO;
pub use unix::UnixIO as SyscallIO;
pub use io_uring::UringIO as PlatformIO;
pub use unix::UnixIO as PlatformIO;
}
#[cfg(any(all(target_os = "linux",not(feature = "io_uring")), target_os = "macos"))] {