Re: dm-rq: do not update rq partially in each ending bio
From: Ming Lei <hidden>
Date: 2017-08-25 17:15:14
Also in:
dm-devel
On Sat, Aug 26, 2017 at 01:07:53AM +0800, Ming Lei wrote:
On Fri, Aug 25, 2017 at 12:32:33PM -0400, Mike Snitzer wrote:quoted
On Fri, Aug 25 2017 at 12:08pm -0400, Ming Lei [off-list ref] wrote:quoted
On Fri, Aug 25, 2017 at 11:48:39AM -0400, Mike Snitzer wrote:quoted
On Fri, Aug 25 2017 at 11:27am -0400, Ming Lei [off-list ref] wrote:quoted
We don't need to update orignal dm request partially when ending each cloned bio, and this patch just updates orignal dm request once when the whole cloned request is finished. Partial request update can be a bit expensive, so we should try to avoid it, especially it is run in softirq context. After this patch is applied, both hard lockup and soft lockup aren't reproduced any more in one hour of running Laurence's test[1] on IB/SRP. Without this patch, the lockup can be reproduced in several minutes. BTW, after d4acf3650c7c(block: Make blk_mq_delay_kick_requeue_list() rerun the queue at a quiet time), we need to make the test more aggressive for reproducing the lockup: 1) run hammer_write.sh 32 or 64 concurrently. 2) write 8M each time [1] https://marc.info/?l=linux-block&m=150220185510245&w=2Bart said he cannot reproduce the lockups with his patchset applied. Have you tested using Bart's patchset?d4acf3650c7c(block: Make blk_mq_delay_kick_requeue_list() rerun the queue at a quiet time) has been in linus tree. For other patches, I didn't test it yet. Because every time when the lockup is triggered, it is always in blk_recalc_rq_segments(), and not see any patch is dealing with that.Please test with all of Bart's patches applied!Just done the test with Bart's patch, still can see soft lockup when running the test described
Looks no difference, hard lockup can be observed too following soft lockup after a while with Bart's patch. -- Ming