Replies: 1 comment
-
len < 512 means len is 16, which is for receiving reply, so probably 16 is
It improves whole ublk-nbd much, and you can observe performance change by killing it via simply setting loops as zero(by taking completely io_uring method). Just use recv() may block the current context for long time, so won't work. This is really good question, and I think there is big chance to improve current implementation. Any feedback or patches are welcome.
It is just to pass data and wake up __nbd_handle_io_async(), which needs Thanks, |
Beta Was this translation helpful? Give feedback.
-
Hello experts,
I'm studying the implementation of the ublk-nbd's nbd_do_recv(). There are some questions arising when I was reading the codes.
const int loops = len < 512 ? 16 : 32;
, why does it setloops
to a smaller number whenlen
is smaller than32
instead of32
for any len?recv()
first and thennbd_start_recv
(io_uring method)? Why not just userecv()
ornbd_start_recv (io_uring method)
? Does hybrid approach have any advantage?fake_cqe
in__nbd_handle_recv()
Many thanks for helps in advance.
Beta Was this translation helpful? Give feedback.
All reactions