From: Yongsoo Joo <ysjoo@kookmin.ac.kr>
To: Keith Busch <kbusch@kernel.org>
Cc: axboe@kernel.dk, hch@lst.de, sagi@grimberg.me,
linux-nvme@lists.infradead.org
Subject: Re: [PATCH v2] nvme: change the return type of nvme_poll()
Date: Mon, 9 Dec 2024 21:39:42 +0000 [thread overview]
Message-ID: <Z1djnrzTvra6wyMn@ubuntu> (raw)
In-Reply-To: <Z1cQXGWGRZ5dcWOW@kbusch-mbp.dhcp.thefacebook.com>
On Mon, Dec 09, 2024 at 08:44:28AM -0700, Keith Busch wrote:
> On Mon, Dec 09, 2024 at 01:33:44PM +0000, Yongsoo Joo wrote:
> > -static int nvme_poll(struct blk_mq_hw_ctx *hctx, struct io_comp_batch *iob)
> > +static bool nvme_poll(struct blk_mq_hw_ctx *hctx, struct io_comp_batch *iob)
> > {
> > struct nvme_queue *nvmeq = hctx->driver_data;
> > bool found;
> > --
>
> This function is registered with blk_mq_ops, so you would have to change
> the prototype there too, and every other driver that also registers a
> poll op. Honestly, it may not be worth the effort.
Oh, I overlooked the issue you pointed out, which brings me back to my initial
suggestion. The function nvme_poll_cq() returns the number of found CQEs, but
nvme_poll() seems to unnecessarily reduce this information to a boolean.
A minimal change from “bool found” to “int found” in nvme_poll() would
preserve this information, allowing any interested researcher to make use of
it. Also, the description of poll in blk_mq_ops can be expanded as follows:
/**
* @poll: Called to poll for completion of a specific tag.
* Returns the number of CQEs found.
*/
Thank you for your time, and I look forward to hearing your opinion.
--
next prev parent reply other threads:[~2024-12-09 21:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-09 13:33 [PATCH v2] nvme: change the return type of nvme_poll() Yongsoo Joo
2024-12-09 15:44 ` Keith Busch
2024-12-09 21:39 ` Yongsoo Joo [this message]
2024-12-10 0:01 ` Keith Busch
2024-12-10 0:37 ` Yongsoo Joo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z1djnrzTvra6wyMn@ubuntu \
--to=ysjoo@kookmin.ac.kr \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.