linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Block <bblock@linux.ibm.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Matthew Wilcox <willy@infradead.org>,
	Jens Axboe <axboe@kernel.dk>, Khalid Aziz <khalid@gonehiking.org>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Hannes Reinecke <hare@suse.com>,
	Ondrej Zary <linux@rainbow-software.org>,
	linux-block@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH 7/8] block: refactor the bounce buffering code
Date: Wed, 24 Mar 2021 18:40:32 +0100	[thread overview]
Message-ID: <YFt5kPs30x4kPu77@t480-pf1aa2c2.linux.ibm.com> (raw)
In-Reply-To: <20210318125340.GA21262@lst.de>

On Thu, Mar 18, 2021 at 01:53:40PM +0100, Christoph Hellwig wrote:
> On Thu, Mar 18, 2021 at 11:29:50AM +0000, Matthew Wilcox wrote:
> > On Thu, Mar 18, 2021 at 07:39:22AM +0100, Christoph Hellwig wrote:
> > > @@ -536,7 +518,7 @@ int blk_stack_limits(struct queue_limits *t, struct queue_limits *b,
> > >  					b->max_write_zeroes_sectors);
> > >  	t->max_zone_append_sectors = min(t->max_zone_append_sectors,
> > >  					b->max_zone_append_sectors);
> > > -	t->bounce_pfn = min_not_zero(t->bounce_pfn, b->bounce_pfn);
> > > +	t->bounce = min_not_zero(t->bounce, b->bounce);
> > 
> > I see how min_not_zero() made sense when it was a pfn.  Does it still
> > make sense now it's an enum?  I would have thought it'd now be 'max()',
> > given the definitions later on.
> 
> Actually, blk_stack_limits should not look at ->bounce_pfn / ->bounce
> at all.  blk_queue_bounce is only called my blk_mq_submit_bio, and
> the only stacked blk-mq driver (dm-mpath) does not need bouncing.
> 
> I'll add a patch to fix this up to the front of the series.

Is blk_queue_bounce() called again when mpath submits the request to the
lower device? I thought when I looked at this code some time ago
bouncing would only be checked the first time a request is created
(dm-mpath), and then not again, so when we don't check for whether
bouncing is necessary in mpath, we still might screw the LLD - hence why
we might inherit this via the limits.

-- 
Best Regards, Benjamin Block  / Linux on IBM Z Kernel Development / IBM Systems
IBM Deutschland Research & Development GmbH    /    https://www.ibm.com/privacy
Vorsitz. AufsR.: Gregor Pillen         /        Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen / Registergericht: AmtsG Stuttgart, HRB 243294

  reply	other threads:[~2021-03-24 17:42 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-18  6:39 start removing block bounce buffering support Christoph Hellwig
2021-03-18  6:39 ` [PATCH 1/8] aha1542: use a local bounce buffer Christoph Hellwig
2021-03-18  6:39 ` [PATCH 2/8] Buslogic: remove ISA support Christoph Hellwig
2021-03-18  6:39 ` [PATCH 3/8] BusLogic: reject broken old firmware that requires ISA-style bounce buffering Christoph Hellwig
2021-03-18  6:39 ` [PATCH 4/8] advansys: remove ISA support Christoph Hellwig
2021-03-18 11:20   ` Matthew Wilcox
2021-03-18 12:54     ` Christoph Hellwig
2021-03-18 14:34       ` Matthew Wilcox
2021-03-18  6:39 ` [PATCH 5/8] scsi: remove the unchecked_isa_dma flag Christoph Hellwig
2021-03-18  6:39 ` [PATCH 6/8] block: remove BLK_BOUNCE_ISA support Christoph Hellwig
2021-03-18  6:39 ` [PATCH 7/8] block: refactor the bounce buffering code Christoph Hellwig
2021-03-18 11:29   ` Matthew Wilcox
2021-03-18 12:53     ` Christoph Hellwig
2021-03-24 17:40       ` Benjamin Block [this message]
2021-03-24 17:44         ` Christoph Hellwig
2021-03-24 18:07           ` Benjamin Block
2021-03-24 18:13             ` Christoph Hellwig
2021-03-18  6:39 ` [PATCH 8/8] block: stop calling blk_queue_bounce for passthrough requests Christoph Hellwig
2021-03-26  5:58 start removing block bounce buffering support v2 Christoph Hellwig
2021-03-26  5:58 ` [PATCH 7/8] block: refactor the bounce buffering code Christoph Hellwig
2021-03-29  6:34   ` Hannes Reinecke
2021-03-31  7:29 start removing block bounce buffering support v3 Christoph Hellwig
2021-03-31  7:30 ` [PATCH 7/8] block: refactor the bounce buffering code Christoph Hellwig

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=YFt5kPs30x4kPu77@t480-pf1aa2c2.linux.ibm.com \
    --to=bblock@linux.ibm.com \
    --cc=axboe@kernel.dk \
    --cc=hare@suse.com \
    --cc=hch@lst.de \
    --cc=khalid@gonehiking.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux@rainbow-software.org \
    --cc=martin.petersen@oracle.com \
    --cc=willy@infradead.org \
    --subject='Re: [PATCH 7/8] block: refactor the bounce buffering code' \
    /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

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox