All of lore.kernel.org
 help / color / mirror / Atom feed
From: JeffleXu <jefflexu@linux.alibaba.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: snitzer@redhat.com, joseph.qi@linux.alibaba.com,
	dm-devel@redhat.com, linux-block@vger.kernel.org,
	io-uring@vger.kernel.org
Subject: Re: [PATCH v2 3/6] block: add iopoll method to support bio-based IO polling
Date: Thu, 28 Jan 2021 19:52:05 +0800	[thread overview]
Message-ID: <7d5402f2-c4d7-9d9a-e637-54a2dd349b3f@linux.alibaba.com> (raw)
In-Reply-To: <20210128084016.GA1951639@infradead.org>



On 1/28/21 4:40 PM, Christoph Hellwig wrote:
> On Mon, Jan 25, 2021 at 08:13:37PM +0800, Jeffle Xu wrote:
>> +int blk_poll(struct request_queue *q, blk_qc_t cookie, bool spin)
> 
> Can you split the guts of this function into two separate helpers
> for the mq vs non-mq case?  As is is is a little hard to read and
> introduced extra branches in the fast path.
> 

I know your consideration, actually I had ever tried.

I can extract some helper functions, but I'm doubted if the extra
function call is acceptable.

Besides, the iteration logic is generic and I'm afraid the branch or
function call is unavoidable. Or if we maintain two separate function
for mq and dm, the code duplication may be unavoidable.

Anyway I'll give a try.

-- 
Thanks,
Jeffle

WARNING: multiple messages have this Message-ID (diff)
From: JeffleXu <jefflexu@linux.alibaba.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-block@vger.kernel.org, joseph.qi@linux.alibaba.com,
	dm-devel@redhat.com, io-uring@vger.kernel.org,
	snitzer@redhat.com
Subject: Re: [dm-devel] [PATCH v2 3/6] block: add iopoll method to support bio-based IO polling
Date: Thu, 28 Jan 2021 19:52:05 +0800	[thread overview]
Message-ID: <7d5402f2-c4d7-9d9a-e637-54a2dd349b3f@linux.alibaba.com> (raw)
In-Reply-To: <20210128084016.GA1951639@infradead.org>



On 1/28/21 4:40 PM, Christoph Hellwig wrote:
> On Mon, Jan 25, 2021 at 08:13:37PM +0800, Jeffle Xu wrote:
>> +int blk_poll(struct request_queue *q, blk_qc_t cookie, bool spin)
> 
> Can you split the guts of this function into two separate helpers
> for the mq vs non-mq case?  As is is is a little hard to read and
> introduced extra branches in the fast path.
> 

I know your consideration, actually I had ever tried.

I can extract some helper functions, but I'm doubted if the extra
function call is acceptable.

Besides, the iteration logic is generic and I'm afraid the branch or
function call is unavoidable. Or if we maintain two separate function
for mq and dm, the code duplication may be unavoidable.

Anyway I'll give a try.

-- 
Thanks,
Jeffle

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


  reply	other threads:[~2021-01-28 11:52 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-25 12:13 [PATCH v2 0/6] dm: support IO polling for bio-based dm device Jeffle Xu
2021-01-25 12:13 ` [dm-devel] " Jeffle Xu
2021-01-25 12:13 ` [PATCH v2 1/6] block: move definition of blk_qc_t to types.h Jeffle Xu
2021-01-25 12:13   ` [dm-devel] " Jeffle Xu
2021-01-25 12:13 ` [PATCH v2 2/6] block: add queue_to_disk() to get gendisk from request_queue Jeffle Xu
2021-01-25 12:13   ` [dm-devel] " Jeffle Xu
2021-01-27 17:20   ` Mike Snitzer
2021-01-27 17:20     ` [dm-devel] " Mike Snitzer
2021-01-25 12:13 ` [PATCH v2 3/6] block: add iopoll method to support bio-based IO polling Jeffle Xu
2021-01-25 12:13   ` [dm-devel] " Jeffle Xu
2021-01-27 17:14   ` Mike Snitzer
2021-01-27 17:14     ` [dm-devel] " Mike Snitzer
2021-01-28  8:40   ` Christoph Hellwig
2021-01-28  8:40     ` [dm-devel] " Christoph Hellwig
2021-01-28 11:52     ` JeffleXu [this message]
2021-01-28 11:52       ` JeffleXu
2021-01-28 14:36       ` Christoph Hellwig
2021-01-28 14:36         ` [dm-devel] " Christoph Hellwig
2021-01-25 12:13 ` [PATCH v2 4/6] dm: always return BLK_QC_T_NONE for bio-based device Jeffle Xu
2021-01-25 12:13   ` [dm-devel] " Jeffle Xu
2021-01-25 12:13 ` [PATCH v2 5/6] block: add QUEUE_FLAG_POLL_CAP flag Jeffle Xu
2021-01-25 12:13   ` [dm-devel] " Jeffle Xu
2021-01-27 17:13   ` Mike Snitzer
2021-01-27 17:13     ` [dm-devel] " Mike Snitzer
2021-01-28  2:07     ` JeffleXu
2021-01-28  2:07       ` [dm-devel] " JeffleXu
2021-01-25 12:13 ` [PATCH v2 6/6] dm: support IO polling for bio-based dm device Jeffle Xu
2021-01-25 12:13   ` [dm-devel] " Jeffle Xu
2021-01-29  7:37   ` JeffleXu
2021-01-29  7:37     ` [dm-devel] " JeffleXu
2021-01-27 17:19 ` [PATCH v2 0/6] " Mike Snitzer
2021-01-27 17:19   ` [dm-devel] " Mike Snitzer
2021-01-28  3:06   ` JeffleXu
2021-01-28  3:06     ` [dm-devel] " JeffleXu
2021-01-31 16:26     ` Mike Snitzer

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=7d5402f2-c4d7-9d9a-e637-54a2dd349b3f@linux.alibaba.com \
    --to=jefflexu@linux.alibaba.com \
    --cc=dm-devel@redhat.com \
    --cc=hch@infradead.org \
    --cc=io-uring@vger.kernel.org \
    --cc=joseph.qi@linux.alibaba.com \
    --cc=linux-block@vger.kernel.org \
    --cc=snitzer@redhat.com \
    /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.