Conversation
drivers/td-blkif.h
Outdated
| #include "tapdisk-metrics.h" | ||
|
|
||
| #define BLKIF_MAX_QUEUES 4 | ||
| #define BLKIF_MAX_GRANT_REF 8 /* TODO Why 8 specifically? */ |
There was a problem hiding this comment.
I think this is already defined as MAX_RING_PAGES.
There was a problem hiding this comment.
These macros have been moved in common header file on another commit.
But your remark about is still valid.
drivers/td-blkif.h
Outdated
| #include "tapdisk-utils.h" | ||
| #include "tapdisk-metrics.h" | ||
|
|
||
| #define BLKIF_MAX_QUEUES 4 |
There was a problem hiding this comment.
I prefer not to prefix names with BLKIF_ as it could be interpreted as the official protocol. Maybe MAX_QUEUES is enough. And probably it will be better to move it in include/xen_blkif.h.
| int proto, const char *pool_name, const int minor) | ||
| tap_ctl_connect_xenblkif(const pid_t pid, const domid_t domid, const int devid, | ||
| int poll_duration, int poll_idle_threshold, | ||
| const grant_ref_t grefs[][8], const int order, const int queues, |
tapback/frontend.c
Outdated
| #include "xen_blkif.h" | ||
|
|
||
| #define BLKIF_MAX_QUEUES 4 | ||
| #define BLKIF_MAX_GRANT_REF 8 |
There was a problem hiding this comment.
No need to redefine those constants as frontend.c includes xen_blkif.h.
Pure C99 won't compile that's why I forced to gnu99. But my initial goal was to enforce a version mainly to be able to use boolean and int32/int64 in a standard way. C11 might be as good, but I didn't want to force for a too recent specification like C23 that might be well supported by all compilers. I should explain that in the commit log. |
3726e27 to
974d9cc
Compare
When doing pause/unpause there was a memory leak related to coroutine stack when coroutine pool are used (CONFIG_COROUTINE_POOL). Code using QEMU threads can register a callback at thread exit, and QEMU coroutine have local_pool_cleanup() registered for that. We just have to use QEMU threads instead of standard pthreads to free the stack coroutine memory.
Mainly useful for debug, and error report, but can hurt performances.
Some part of the project won't compile with ISO C99.
If tapdisk PID is not found, temporary structure must be freed. Not a big deal, except when enabling Address Sanitizer during tests.
It is not possible list more than 7 VBD for a single tapdisk. In real life scenario, but might be an issue for stress tests.
974d9cc to
0dbb3ab
Compare
No description provided.