Thread (33 messages) 33 messages, 4 authors, 2021-10-13

Re: [PATCH 1/9] block: add a struct io_batch argument to fops->iopoll()

From: Jens Axboe <axboe@kernel.dk>
Date: 2021-10-12 18:28:51

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help