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: <CAF1ivSbu4e2MzUB2CPJi92PpkOvLrLA=TO55-=7m07GpYz98Xw@mail.gmail.com>
Date:	Wed, 20 May 2015 11:16:20 -0700
From:	Ming Lin <mlin@...nel.org>
To:	Christoph Hellwig <hch@....de>
Cc:	Ming Lin <mlin@...nel.org>, lkml <linux-kernel@...r.kernel.org>,
	Jens Axboe <axboe@...nel.dk>,
	Kent Overstreet <kent.overstreet@...il.com>,
	Dongsu Park <dpark@...teo.net>,
	Christoph Hellwig <hch@...radead.org>,
	Al Viro <viro@...iv.linux.org.uk>,
	Ming Lei <ming.lei@...onical.com>, Neil Brown <neilb@...e.de>,
	Alasdair Kergon <agk@...hat.com>,
	Mike Snitzer <snitzer@...hat.com>, dm-devel@...hat.com,
	Lars Ellenberg <drbd-dev@...ts.linbit.com>,
	drbd-user@...ts.linbit.com, Jiri Kosina <jkosina@...e.cz>,
	Geoff Levand <geoff@...radead.org>, Jim Paris <jim@...n.com>,
	Joshua Morris <josh.h.morris@...ibm.com>,
	Philip Kelleher <pjk1939@...ux.vnet.ibm.com>,
	Minchan Kim <minchan@...nel.org>,
	Nitin Gupta <ngupta@...are.org>,
	Oleg Drokin <oleg.drokin@...el.com>,
	Andreas Dilger <andreas.dilger@...el.com>
Subject: Re: [PATCH v3 01/11] block: make generic_make_request handle
 arbitrarily sized bios

On Wed, May 20, 2015 at 5:44 AM, Christoph Hellwig <hch@....de> wrote:
> This needs the patch below for the blk-mq case with multiple queues.

Will add it.

>
> Also I wonder why we really want to push this below ->make_request.
> Moving it just outside ->make_request would make the callchain more
> obvious and avoid the recursion into the driver.

Are you saying move the split to generic_make_request()?
Below is an off-list discussion.

Ming Lei asked:
> > I am wondering why the bio isn't splitted just before q->make_request_fn
> > is called in generic_make_request()?  By this way, drivers won't need
> > to call blk_queue_split() at all.  Is it because performance reason? or
> > others?

Kent replied:
> > The reasoning was because blk_queue_split() was only an interim solution -
> > there's actually no inherent need to split the bios at all, but not splitting
> > them takes (a small amount of) driver modification. You just have the driver
> > consume the bios incrementally, advancing the iterator and using bi_remaining
> > when they have multiple tags pointing to the same bio.

>
>
> diff --git a/block/blk-mq.c b/block/blk-mq.c
> index e9bbc04..e7fae76 100644
> --- a/block/blk-mq.c
> +++ b/block/blk-mq.c
> @@ -1256,6 +1256,8 @@ static void blk_mq_make_request(struct request_queue *q, struct bio *bio)
>                 return;
>         }
>
> +       blk_queue_split(q, &bio, q->bio_split);
> +
>         rq = blk_mq_map_request(q, bio, &data);
>         if (unlikely(!rq))
>                 return;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ