[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1438754604.29731.31.camel@hasee>
Date: Tue, 04 Aug 2015 23:03:24 -0700
From: Ming Lin <mlin@...nel.org>
To: Christoph Hellwig <hch@....de>
Cc: Mike Snitzer <snitzer@...hat.com>,
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>, 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>,
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>,
Ming Lin <ming.l@....samsung.com>
Subject: Re: [PATCH v5 01/11] block: make generic_make_request handle
arbitrarily sized bios
On Tue, 2015-08-04 at 13:36 +0200, Christoph Hellwig wrote:
> On Sun, Aug 02, 2015 at 10:58:22PM -0700, Ming Lin wrote:
> > I think the important thing is the late splitting for regular bio.
> > For discard/write_same bio, how about just don't do late splitting?
>
> I'd hate having to special case them even more. Especially as the
> discard splitting is nasty and we really don't want to send giant
> discards by default anyway (see Jens' patches to limit discard size
> by default).
>
> So I'd recommend to keep everything as-is, just make sure we don't
> overflow bi_size.
Did you mean to remove "PATCH 4 block: remove split code in
blkdev_issue_discard" or to keep it?
Which of below 2 solutions you prefer?
- Solution 1
remove splits in blkdev_issue_{discard,write_same} and keep
blk_bio_{discard,write_same}_split
But for blkdev_issue_discard(), it's not enough if only make sure
bi_size not overflow, for example, discard 4G
4G bytes = 8388608 sectors
UINT_MAX = 8388607 sectors
So blkdev_issue_discard() will send 2 discard bios.
First bio: sector 0 .. 8388606
Second bio: sector 8388607 .. 8388607
In this case, the 2 discard tests in device-mapper-test-suite still
fail, probably because the second bio start sector is not aligned with
discard_granularity.
So I have to take into account discard_granularity(assume 32 sectors),
then blkdev_issue_discard() will send 2 discard bios, as
First bio: sector 0 .. 8388575
Second bio: sector 8388576 .. 8388607
In this case, both discard tests passed.
- Solution 2
special case discard/write_same bios(You said you hate it).
That is to keep splits in blkdev_issue_{discard,write_same} and remove
blk_bio_{discard,write_same}_split
I think this is more clean way because blkdev_issue_{discard,write_same}
already make sure we don't overflow bi_size.
And blk_bio_{discard,write_same}_split are actually duplicated with the
splits in blkdev_issue_{discard,write_same}. It's OK to remove it.
--
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