Skip to content

Instantly share code, notes, and snippets.

@sgzerolc
Last active October 31, 2022 10:06
Show Gist options
  • Save sgzerolc/9a142bcc544fa13819db523397898685 to your computer and use it in GitHub Desktop.
Save sgzerolc/9a142bcc544fa13819db523397898685 to your computer and use it in GitHub Desktop.
qemu
x86_64-softmmu/qemu-system-x86_64 \
-kernel path/to/arch/x86_64/boot/bzImage \
-nographic \
-append "console=ttyS0 nokaslr" \
-initrd test.qcow2\
-m 512\
--enable-kvm \
-cpu host \
-drive if=virtio,file=test.img,format=raw,aio=io_uring,cache=none
@sgzerolc
Copy link
Author

sgzerolc commented Apr 15, 2022

./build/qemu-system-x86_64 -m 1024 -enable-kvm -drive if=virtio,file=test.img,format=raw,aio=io_uring,cache=none --trace events=reach.txt
./build/qemu-img create test.img 2G

@sgzerolc
Copy link
Author

sgzerolc commented Oct 3, 2022

qemu-img create -f zoned loop.img
dd if=/dev/zero of=loop.img bs=1M count=10000
losetup /dev/loop0 loop.img

test:
./build/qemu-io --image-opts -n driver=zoned,filename=/dev/loop0,cache.direct=on -c "zrp 0 1"

@sgzerolc
Copy link
Author

sgzerolc commented Oct 3, 2022

-blockdev node-name=q1,driver=raw,file.driver=host_device,file.filename=/dev/loop0 \
-device virtio-blk,drive=q1

@sgzerolc
Copy link
Author

sgzerolc commented Oct 10, 2022

./build/qemu-img create -f zoned test.zoned -o size=64M  -o zoned=1 -o zone_nr_conv=0 -o zone_nr_seq=12 -o max_append_sectors=4 -o max_open_zones=8 -o max_active_zones=12
./build/qemu-io --image-opts -n driver=zoned,file.driver=file,file.filename=test.zoned -c "zrp 0 1"

@sgzerolc
Copy link
Author

strace -o uring.txt ../qemu/build/qemu-system-x86_64 -m 1024 -enable-kvm -drive if=virtio,file=uring.raw,format=raw,aio=io_uring,cache=none

@sgzerolc
Copy link
Author

sgzerolc commented Oct 31, 2022

./build/qemu-img create -f zoned test.zoned -o size=64M -o zoned=1 -o zone_size=131072 -o zone_nr_conv=4 -o zone_nr_seq=8 -o max_append_sectors=4 -o max_open_zones=8 -o max_active_zones=8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment