All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, dm-devel@redhat.com,
	Uday Shankar <ushankar@purestorage.com>,
	Alasdair Kergon <agk@redhat.com>
Subject: Re: [dm-devel] blk-mq: enforce op-specific segment limits in blk_insert_cloned_request
Date: Fri, 17 Feb 2023 11:43:34 -0500	[thread overview]
Message-ID: <Y++utrkJXuUsD0K4@redhat.com> (raw)
In-Reply-To: <Y++oTz0ck9OGE4Se@infradead.org>

On Fri, Feb 17 2023 at 11:16P -0500,
Christoph Hellwig <hch@infradead.org> wrote:

> On Thu, Feb 16, 2023 at 12:27:02PM -0700, Uday Shankar wrote:
> >  * Description:
> >  *    @rq may have been made based on weaker limitations of upper-level queues
> >  *    in request stacking drivers, and it may violate the limitation of @q.
> >  *    Since the block layer and the underlying device driver trust @rq
> >  *    after it is inserted to @q, it should be checked against @q before
> >  *    the insertion using this generic function.
> >  *
> >  *    Request stacking drivers like request-based dm may change the queue
> >  *    limits when retrying requests on other queues. Those requests need
> >  *    to be checked against the new queue limits again during dispatch.
> >  */.
> > 
> > Is this concern no longer relevant?
> 
> The concern is still valid, but it does not refer to the debug check.
> It refers to recalculating nr_phys_segments using
> blk_recalc_rq_segments, and the fact that any driver using this
> interface needs to stack its limits properly.

It is a negative check that you're calling a debug check.

Much easier to address a bug in a driver when seeing this message than
figuring it out after more elaborate hunting. Not seeing the downside
of preserving/fixing given it is a quick limit check. *shrug*

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


WARNING: multiple messages have this Message-ID (diff)
From: Mike Snitzer <snitzer@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Uday Shankar <ushankar@purestorage.com>,
	Jens Axboe <axboe@kernel.dk>, Alasdair Kergon <agk@redhat.com>,
	linux-block@vger.kernel.org, dm-devel@redhat.com
Subject: Re: blk-mq: enforce op-specific segment limits in blk_insert_cloned_request
Date: Fri, 17 Feb 2023 11:43:34 -0500	[thread overview]
Message-ID: <Y++utrkJXuUsD0K4@redhat.com> (raw)
In-Reply-To: <Y++oTz0ck9OGE4Se@infradead.org>

On Fri, Feb 17 2023 at 11:16P -0500,
Christoph Hellwig <hch@infradead.org> wrote:

> On Thu, Feb 16, 2023 at 12:27:02PM -0700, Uday Shankar wrote:
> >  * Description:
> >  *    @rq may have been made based on weaker limitations of upper-level queues
> >  *    in request stacking drivers, and it may violate the limitation of @q.
> >  *    Since the block layer and the underlying device driver trust @rq
> >  *    after it is inserted to @q, it should be checked against @q before
> >  *    the insertion using this generic function.
> >  *
> >  *    Request stacking drivers like request-based dm may change the queue
> >  *    limits when retrying requests on other queues. Those requests need
> >  *    to be checked against the new queue limits again during dispatch.
> >  */.
> > 
> > Is this concern no longer relevant?
> 
> The concern is still valid, but it does not refer to the debug check.
> It refers to recalculating nr_phys_segments using
> blk_recalc_rq_segments, and the fact that any driver using this
> interface needs to stack its limits properly.

It is a negative check that you're calling a debug check.

Much easier to address a bug in a driver when seeing this message than
figuring it out after more elaborate hunting. Not seeing the downside
of preserving/fixing given it is a quick limit check. *shrug*

  reply	other threads:[~2023-02-17 16:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-15 20:15 [dm-devel] [PATCH] blk-mq: enforce op-specific segment limits in blk_insert_cloned_request Uday Shankar
2023-02-15 20:15 ` Uday Shankar
2023-02-16  6:09 ` [dm-devel] " Christoph Hellwig
2023-02-16  6:09   ` Christoph Hellwig
2023-02-16 19:27   ` [dm-devel] " Uday Shankar
2023-02-16 19:27     ` Uday Shankar
2023-02-17  0:13     ` [dm-devel] " Mike Snitzer
2023-02-17  0:13       ` Mike Snitzer
2023-02-17 16:16     ` [dm-devel] [PATCH] " Christoph Hellwig
2023-02-17 16:16       ` Christoph Hellwig
2023-02-17 16:43       ` Mike Snitzer [this message]
2023-02-17 16:43         ` Mike Snitzer
2023-02-17 21:41         ` [dm-devel] " Uday Shankar
2023-02-17 21:41           ` Uday Shankar
2023-02-16 13:06 ` [dm-devel] [PATCH] " kernel test robot
2023-02-16 13:06   ` kernel test robot

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=Y++utrkJXuUsD0K4@redhat.com \
    --to=snitzer@kernel.org \
    --cc=agk@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=dm-devel@redhat.com \
    --cc=hch@infradead.org \
    --cc=linux-block@vger.kernel.org \
    --cc=ushankar@purestorage.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.