Last active
October 31, 2022 10:06
-
-
Save sgzerolc/9a142bcc544fa13819db523397898685 to your computer and use it in GitHub Desktop.
qemu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
build rpm(shoud not do)
- delete line in liburing.spec:
Source1: https://brick.kernel.dk/snaps/%{name}-%{version}.tar.gz.asc
make srpm
rpmbuild --rebuild -bb liburing-2.2-1.fc35.src.rpm
RPM build errors:Bad exit status from /var/tmp/rpm-tmp.AiAAj7 (%build)
cat ~/rpmbuild/BUILD/liburing-2.2/config.log
/usr/bin/ld: /tmp/ccO6Exo6.o: relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
- add -no-pie to CFLAG in congiguration file and rebuild rpm,
same error.
install liburing
./configure --libdir=/usr/lib64 --libdevdir=/usr/lib64
make && sudo make install
liburing: undefined reference to collect2: error: ld returned 1 exit status
make V=1
/usr/bin/ld: libblock.fa(block_io_uring.c.o): in function `luring_cleanup':
/home/olc/Desktop/qemu/build/../block/io_uring.c:444: undefined reference to `io_uring_unregister_ring_fd'
collect2: err:ld return 1
./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
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"
-blockdev node-name=q1,driver=raw,file.driver=host_device,file.filename=/dev/loop0 \
-device virtio-blk,drive=q1
./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"
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
./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
default setting:
x86_64-softmmu/qemu-system-x86_64 -m 512 --enable-kvm
create img:
./qemu-img create -f qcow2 test.qcow2 16G
./qemu-img create test.img 2G
add test
path/to/qemu-system-x86_64 -m 1024 -enable-kvm -drive if=virtio,file=path/to/test.img,format=raw,aio=io_uring,cache=none
trace
want to trace: ioq_*, luring_*, qemu_luring_* and write into txt files.
./configure --target-list=x86_64-softmmu --enable-kvm --enable-debug --enable-trace-backends=simple
./configure --target-list=x86_64-softmmu --enable-kvm --enable-slirp --enable-trace-backends=simple,dtrace >config
in qemu dir:
path/to/qemu-system-x86_64 -m 1024 -enable-kvm -drive if=virtio,file=path/to/test.img,format=raw,aio=io_uring,cache=none --trace events=reach.txt
after running: there is no trace-events-all file in qemu repo.
gdb
gdb -q --args path/to/qemu-system-x86_64 -drive file=test.img,if=virtio,aio=io_uring --enable-kvm -smp 2 -m 1G