[dm-devel] [PATCH 1/5] blk: Ensure users for current->bio_list can see the full list.

2017-03-09 Thread NeilBrown
Commit 79bd99596b73 ("blk: improve order of bio handling in generic_make_request()") changed current->bio_list so that it did not contain *all* of the queued bios, but only those submitted by the currently running make_request_fn. There are two places which walk the list and requeue selected

[dm-devel] [PATCH 2/5] blk: remove bio_set arg from blk_queue_split()

2017-03-09 Thread NeilBrown
blk_queue_split() is always called with the last arg being q->bio_split, where 'q' is the first arg. Also blk_queue_split() sometimes uses the passed-in 'bs' and sometimes uses q->bio_split. This is inconsistent and unnecessary. Remove the last arg and always use q->bio_split inside

[dm-devel] [PATCH 5/5] block_dev: make blkdev_dio_pool a non-rescuing bioset

2017-03-09 Thread NeilBrown
Allocations from blkdev_dio_pool are never made under generic_make_request, so this bioset does not need a rescuer thread. Signed-off-by: NeilBrown --- fs/block_dev.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/block_dev.c b/fs/block_dev.c index

Re: [dm-devel] [PATCH v2] blk: improve order of bio handling in generic_make_request()

2017-03-09 Thread NeilBrown
On Thu, Mar 09 2017, Jens Axboe wrote: > On 03/09/2017 09:32 PM, NeilBrown wrote: >> >> I started looking further at the improvements we can make once >> generic_make_request is fixed, and realised that I had missed an >> important detail in this patch. >> Several places test current->bio_list,

Re: [dm-devel] [PATCH v2] blk: improve order of bio handling in generic_make_request()

2017-03-09 Thread Jens Axboe
On 03/09/2017 09:38 PM, Jens Axboe wrote: > On 03/09/2017 09:32 PM, NeilBrown wrote: >> >> I started looking further at the improvements we can make once >> generic_make_request is fixed, and realised that I had missed an >> important detail in this patch. >> Several places test current->bio_list,

Re: [dm-devel] [PATCH v2] blk: improve order of bio handling in generic_make_request()

2017-03-09 Thread Jens Axboe
On 03/09/2017 09:32 PM, NeilBrown wrote: > > I started looking further at the improvements we can make once > generic_make_request is fixed, and realised that I had missed an > important detail in this patch. > Several places test current->bio_list, and two actually edit the list. > With this

[dm-devel] [PATCH 4/5] blk: use non-rescuing bioset for q->bio_split.

2017-03-09 Thread NeilBrown
A rescuing bioset is only useful if there might be bios from that same bioset on the bio_list_on_stack queue at a time when bio_alloc_bioset() is called. This never applies to q->bio_split. Allocations from q->bio_split are only ever made from blk_queue_split() which is only ever called early

[dm-devel] [PATCH 3/5] blk: make the bioset rescue_workqueue optional.

2017-03-09 Thread NeilBrown
This patch converts bioset_create() and bioset_create_nobvec() to not create a workqueue so alloctions will never trigger punt_bios_to_rescuer(). It also introduces bioset_create_rescued() and bioset_create_nobvec_rescued() which preserve the old behaviour. *All* callers of bioset_create() and

Re: [dm-devel] [RFC] dm-thin: Heuristic early chunk copy before COW

2017-03-09 Thread Joe Thornber
Hi Eric, On Wed, Mar 08, 2017 at 10:17:51AM -0800, Eric Wheeler wrote: > Hello all, > > For dm-thin volumes that are snapshotted often, there is a performance > penalty for writes because of COW overhead since the modified chunk needs > to be copied into a freshly allocated chunk. > > What if