All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Bart Van Assche <bvanassche@acm.org>, linux-block@vger.kernel.org
Subject: Re: [PATCH 1/2] blk-mq-tag: change busy_iter_fn to return whether to continue or not
Date: Thu, 8 Nov 2018 10:47:35 -0700	[thread overview]
Message-ID: <c4ce645a-1e09-02eb-ca41-088e83a55cd8@kernel.dk> (raw)
In-Reply-To: <1541698519.196084.225.camel@acm.org>

On 11/8/18 10:35 AM, Bart Van Assche wrote:
> On Thu, 2018-11-08 at 09:31 -0700, Jens Axboe wrote:
>> On 11/8/18 9:28 AM, Bart Van Assche wrote:
>>> On Thu, 2018-11-08 at 09:06 -0700, Jens Axboe wrote:
>>>> --- a/block/blk-mq-debugfs.c
>>>> +++ b/block/blk-mq-debugfs.c
>>>> @@ -424,13 +424,15 @@ struct show_busy_params {
>>>>   * Note: the state of a request may change while this function is in progress,
>>>>   * e.g. due to a concurrent blk_mq_finish_request() call.
>>>>   */
>>>> -static void hctx_show_busy_rq(struct request *rq, void *data, bool reserved)
>>>> +static bool hctx_show_busy_rq(struct request *rq, void *data, bool reserved)
>>>>  {
>>>
>>> Please update the kdoc header above hctx_show_busy_rq() such that it reflects
>>> the new behavior. I'm referring to the "will be called for each request" part.
>>> Otherwise this patch looks fine to me.
>>
>> Took a look at the comment, and what do you want changed? There's no change
>> in behavior for hctx_show_busy_rq(), it loops all requests just like before.
>> We just return true to ensure we continue iterating.
> 
> Oops, I added my reply below the wrong function. I wanted to refer to the
> following comment above blk_mq_queue_tag_busy_iter():
> 
>  * @fn:		Pointer to the function that will be called for each request
> 
> Additionally, how about similar comments above bt_for_each(), bt_tags_for_each()
> blk_mq_all_tag_busy_iter() and blk_mq_tagset_busy_iter()? I think this patch
> affects all these functions.

Fair enough, I'll add a documentation patch. Didn't consider it a big deal
since this is how it's always worked internally, but we haven't exposed
this break/continue functionality outside the sbitmap core until now.

-- 
Jens Axboe

  reply	other threads:[~2018-11-08 17:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-08 16:06 [PATCHSET v2 0/2] Add queue_is_busy helper Jens Axboe
2018-11-08 16:06 ` [PATCH] blk-mq: provide a helper to check if a queue is busy Jens Axboe
2018-11-08 16:06 ` [PATCH 1/2] blk-mq-tag: change busy_iter_fn to return whether to continue or not Jens Axboe
2018-11-08 16:28   ` Bart Van Assche
2018-11-08 16:31     ` Jens Axboe
2018-11-08 17:35       ` Bart Van Assche
2018-11-08 17:47         ` Jens Axboe [this message]
2018-11-08 17:50           ` Jens Axboe
2018-11-08 18:04             ` Bart Van Assche
2018-11-08 16:06 ` [PATCH 2/2] blk-mq: provide a helper to check if a queue is busy Jens Axboe
2018-11-08 16:30   ` Bart Van Assche
2018-11-08 16:32     ` Jens Axboe
2018-11-09  1:53 ` [PATCHSET v2 0/2] Add queue_is_busy helper jianchao.wang
2018-11-09  2:08   ` jianchao.wang
  -- strict thread matches above, loose matches on Subject: below --
2018-11-08 15:42 [PATCHSET " Jens Axboe
2018-11-08 15:42 ` [PATCH 1/2] blk-mq-tag: change busy_iter_fn to return whether to continue or not Jens Axboe
2018-11-08 15:48   ` 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=c4ce645a-1e09-02eb-ca41-088e83a55cd8@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=linux-block@vger.kernel.org \
    /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.