lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190408101903.GC19589@ming.t460p>
Date:   Mon, 8 Apr 2019 18:19:04 +0800
From:   Ming Lei <ming.lei@...hat.com>
To:     Johannes Thumshirn <jthumshirn@...e.de>
Cc:     Nikolay Borisov <nborisov@...e.com>, Jens Axboe <axboe@...nel.dk>,
        Omar Sandoval <osandov@...ndov.com>,
        linux-block@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
        linux-btrfs <linux-btrfs@...r.kernel.org>
Subject: Re: Possible bio merging breakage in mp bio rework

On Mon, Apr 08, 2019 at 11:52:59AM +0200, Johannes Thumshirn wrote:
> On 06/04/2019 02:16, Ming Lei wrote:
> > Hi Nikolay,
> > 
> > On Fri, Apr 05, 2019 at 07:04:18PM +0300, Nikolay Borisov wrote:
> >> Hello Ming, 
> >>
> >> Following the mp biovec rework what is the maximum 
> >> data that a bio could contain? Should it be PAGE_SIZE * bio_vec 
> > 
> > There isn't any maximum data limit on the bio submitted from fs,
> > and block layer will make the final bio sent to driver correct
> > by applying all kinds of queue limit, such as max segment size,
> > max segment number, max sectors, ...
> 
> Naive question, why are we creating possibly huge bios just to split
> them according the the LLDD's limits afterwards?

bio split is one important IO model in block layer, which simplifies
stacked driver(dm, md, bcache, ...) a lot.

It is very reasonable to apply the queue limits in its. make_request_fn().

Otherwise, it will cause huge mess in stacking driver if queue limits
are applied in bio_add_page(), see previous .merge_bvec_fn's implementation
in these stacking drivers.

Not only bio_add_page(), there is also bio clone involved.

> 
> Can't we look at the limits in e.g. bio_add_page() and decide if we need
> to split there?

bio_add_page() is absolutely the fast path, and it is much more efficient
to apply the limit just once in the queue's .make_request_fn.

Thanks,
Ming

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ