Commit a7381107 authored by Yu Kuai's avatar Yu Kuai Committed by openeuler-sync-bot
Browse files

md/md-bitmap: add a new helper to unplug bitmap asynchrously

mainline inclusion
from mainline-v6.5-rc1
commit a022325a
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I8UKFJ
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a022325ab970cf04b66ca128a87345714aa44b99



----------------------------------------

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: default avatarYu Kuai <yukuai3@huawei.com>
Signed-off-by: default avatarSong Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20230529131106.2123367-6-yukuai1@huaweicloud.com



Conflicts:
  Commit 3ce94ce5 ("md: fix duplicate filename for rdev") remove the
  md_rdev_misc_wq;
  Commit 28144f99 ("md: use __register_blkdev to allocate devices on
  demand") changed to use __register_blkdev to allocate devices.
Signed-off-by: default avatarLi Lingfeng <lilingfeng3@huawei.com>
(cherry picked from commit fc77c17f)
parent a5e16079
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment