md/md-bitmap: add a new helper to unplug bitmap asynchrously
authorYu Kuai <yukuai3@huawei.com>
Mon, 29 May 2023 13:11:04 +0000 (21:11 +0800)
committerSong Liu <song@kernel.org>
Tue, 13 Jun 2023 22:25:44 +0000 (15:25 -0700)
commita022325ab970cf04b66ca128a87345714aa44b99
treedb2f8e093f6dbe631cc3bedd27e11887a073a403
parent7db922bae3abdf0a1db81ef7228cc0b996a0c1e3
md/md-bitmap: add a new helper to unplug bitmap asynchrously

If bitmap is enabled, bitmap must update before submitting write io, this
is why unplug callback must move these io to 'conf->pending_io_list' if
'current->bio_list' is not empty, which will suffer performance
degradation.

A new helper md_bitmap_unplug_async() is introduced to submit bitmap io
in a kworker, so that submit bitmap io in raid10_unplug() doesn't require
that 'current->bio_list' is empty.

This patch prepare to limit the number of plugged bio.

Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20230529131106.2123367-6-yukuai1@huaweicloud.com
drivers/md/md-bitmap.c
drivers/md/md-bitmap.h
drivers/md/md.c
drivers/md/md.h