diff options
author | Ming Lei <ming.lei@redhat.com> | 2020-03-18 04:43:36 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-03-18 15:48:03 +0100 |
commit | de6a78b601c529398ad1448e3bffcade1fcf5a70 (patch) | |
tree | 5568090a7bd5dedc3b76fd181bbd6fd99abff17d /block/genhd.c | |
parent | block: fix a device invalidation regression (diff) | |
download | linux-de6a78b601c529398ad1448e3bffcade1fcf5a70.tar.xz linux-de6a78b601c529398ad1448e3bffcade1fcf5a70.zip |
block: Prevent hung_check firing during long sync IO
submit_bio_wait() can be called from ioctl(BLKSECDISCARD), which
may take long time to complete, as Salman mentioned, 4K BLKSECDISCARD
takes up to 100 second on some devices. Also any block I/O operation
that occurs after the BLKSECDISCARD is submitted will also potentially
be affected by the hung task timeouts.
Another report is that task hang can be observed when running mkfs
over raid10 which takes a small max discard sectors limit because
of chunk size.
So prevent hung_check from firing by taking same approach used
in blk_execute_rq(), and the wake-up interval is set as half the
hung_check timer period, which keeps overhead low enough.
Cc: Salman Qazi <sqazi@google.com>
Cc: Jesse Barnes <jsbarnes@google.com>
Cc: Bart Van Assche <bvanassche@acm.org>
Link: https://lkml.org/lkml/2020/2/12/1193
Reported-by: Salman Qazi <sqazi@google.com>
Reviewed-by: Jesse Barnes <jsbarnes@google.com>
Reviewed-by: Salman Qazi <sqazi@google.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/genhd.c')
0 files changed, 0 insertions, 0 deletions