Coder Social home page Coder Social logo

Comments (4)

tomty89 avatar tomty89 commented on July 23, 2024 1

Okay figured it out. Turns out to be caused by a bug in libata. Since scsi-block does SCSI passthrough, CmdQue=0 set by libata is exposed to Windows, which apparently prevents command queuing.

CmdQue=0:
cmdque_0

CmdQue=1:
cmdque_1

It can be fixed with a patch to the kernel like this:

diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index bfec66f..0a35164 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -2097,7 +2097,10 @@ static unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf)
                0,
                0x5,    /* claim SPC-3 version compatibility */
                2,
-               95 - 4
+               95 - 4,
+               0,
+               0,
+               2
        };

        VPRINTK("ENTER\n");
-- 

I think it's better to leave this report open until a fix gets into upstream kernel, but sure it's you guys' call.

from kvm-guest-drivers-windows.

tomty89 avatar tomty89 commented on July 23, 2024

As a reference, I also ran the benchmark with the NVMe emulation in qemu. Works pretty well btw.

qemu-system-x86_64 -enable-kvm -cpu host -smp cores=4 -m 4G -net bridge -net nic -full-screen -drive file=disks/win10__.qcow2,format=qcow2,cache=none,aio=native -drive file=/dev/sdb,format=raw,cache=none,aio=native,if=none,id=bench -device nvme,drive=bench,serial=intel530:

nvme

from kvm-guest-drivers-windows.

YanVugenfirer avatar YanVugenfirer commented on July 23, 2024

Thank you for digging into the issue and finding the cause.

I will keep the issue open for now as a reference for others.

from kvm-guest-drivers-windows.

YanVugenfirer avatar YanVugenfirer commented on July 23, 2024

Fixed in Linux kernel: http://lxr.free-electrons.com/source/drivers/ata/libata-scsi.c#L2099

from kvm-guest-drivers-windows.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.