xfs
[Top] [All Lists]

Re: [PATCH 7/8] block: drbd: avoid to use BIO_MAX_SIZE

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 7/8] block: drbd: avoid to use BIO_MAX_SIZE
From: Lars Ellenberg <lars.ellenberg@xxxxxxxxxx>
Date: Tue, 29 Mar 2016 10:09:21 +0200
Cc: Ming Lei <ming.lei@xxxxxxxxxxxxx>, Jens Axboe <axboe@xxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, linux-block@xxxxxxxxxxxxxxx, Al Viro <viro@xxxxxxxxxxxxxxxxxx>, Anton Altaparmakov <anton@xxxxxxxxxx>, xfs@xxxxxxxxxxx, Dave Chinner <david@xxxxxxxxxxxxx>, drbd-dev@xxxxxxxxxxxxxxxx, Philipp Reisner <philipp.reisner@xxxxxxxxxx>, Boaz Harrosh <boaz@xxxxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20160329073124.GH18920@xxxxxxxxxxxxx>
Mail-followup-to: Christoph Hellwig <hch@xxxxxxxxxxxxx>, Ming Lei <ming.lei@xxxxxxxxxxxxx>, Jens Axboe <axboe@xxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, linux-block@xxxxxxxxxxxxxxx, Al Viro <viro@xxxxxxxxxxxxxxxxxx>, Anton Altaparmakov <anton@xxxxxxxxxx>, xfs@xxxxxxxxxxx, Dave Chinner <david@xxxxxxxxxxxxx>, drbd-dev@xxxxxxxxxxxxxxxx, Philipp Reisner <philipp.reisner@xxxxxxxxxx>, Boaz Harrosh <boaz@xxxxxxxxxxxxx>
References: <1458627149-12988-1-git-send-email-ming.lei@xxxxxxxxxxxxx> <1458627149-12988-8-git-send-email-ming.lei@xxxxxxxxxxxxx> <20160329073124.GH18920@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Mar 29, 2016 at 12:31:24AM -0700, Christoph Hellwig wrote:
> On Tue, Mar 22, 2016 at 02:12:28PM +0800, Ming Lei wrote:
> > drbd is the only user of BIO_MAX_SIZE, so use BIO_MAX_PAGES
> > instead.
> 
> That whole code block looks completely bogus to me, although your patch
> doesn't make it any worse.
> 
> I/O size for a network protocol shouldn't dependend on the number of
> vectors in a kernel internal structure.

That's correct.  But we needed some limit there.
Initially, up until I changed it like six years ago iirc,
the receiving side would receive into a single bio.
So limiting us to what a single bio could usually handle
seemed like a good idea at the time.

Today, we should be able to handle 128 MiB easily,
maybe more. But that would require a protocol bump
to stay backwards compatible.

The part about "architecture not supported",
if our limit (1 MiB) is bigger than the "system" limit:
Never met that in real life. Probably not even possible.
Just a paranoia on my side: what if.
If that would have happened somewhere,
on some strange architecture or configuration,
I wanted to know about that.
Best way: don't even compile.

> Well, getting rid of BIO_MAX_SIZE is worth it, so:
> 
> Reviewed-by: Christoph Hellwig <hch@xxxxxx>

Thanks,

    Lars Ellenberg

<Prev in Thread] Current Thread [Next in Thread>