On 10/12/21 12:25 PM, Bart Van Assche wrote:
On 10/12/21 11:17 AM, Jens Axboe wrote:
quoted
-int bio_poll(struct bio *bio, unsigned int flags)
+int bio_poll(struct bio *bio, struct io_batch *ib, unsigned int flags)
{
How about using the name 'iob' instead of 'ib' for the io_batch
argument? When I saw the 'ib' argument name that name made me wonder for
a second whether it is perhaps related to InfiniBand.
Sure, I don't care too much about that, I can make it iob instead.
quoted
+struct io_batch {
+ struct request *req_list;
+ void (*complete)(struct io_batch *);
+};
Function pointers are not ideal in high-performance code. Is there
another solution than introducing a new function pointer?
You're going to end up with an indirect call at some point anyway, as
the completion part would be driver specific. So I don't think that's
avoidable, it's just a question of where you do it.
--
Jens Axboe