diff options
| author | Yu Kuai <yukuai3@huawei.com> | 2025-08-29 16:04:26 +0800 |
|---|---|---|
| committer | Yu Kuai <yukuai3@huawei.com> | 2025-09-06 17:27:51 +0800 |
| commit | 5ab829f1971dc99f2aac10846c378e67fc875abc (patch) | |
| tree | d7bfa7304d225546e90a9e51cfbc31b0952b18a8 /Documentation/admin-guide | |
| parent | 66be318e6659d10e90f487e2610409cef659dbfe (diff) | |
md/md-llbitmap: introduce new lockless bitmap
Redundant data is used to enhance data fault tolerance, and the storage
method for redundant data vary depending on the RAID levels. And it's
important to maintain the consistency of redundant data.
Bitmap is used to record which data blocks have been synchronized and which
ones need to be resynchronized or recovered. Each bit in the bitmap
represents a segment of data in the array. When a bit is set, it indicates
that the multiple redundant copies of that data segment may not be
consistent. Data synchronization can be performed based on the bitmap after
power failure or readding a disk. If there is no bitmap, a full disk
synchronization is required.
Due to known performance issues with md-bitmap and the unreasonable
implementations:
- self-managed IO submitting like filemap_write_page();
- global spin_lock
I have decided not to continue optimizing based on the current bitmap
implementation, this new bitmap is invented without locking from IO fast
path and can be used with fast disks.
For designs and details, see the comments in drivers/md-llbitmap.c.
Link: https://lore.kernel.org/linux-raid/20250829080426.1441678-12-yukuai1@huaweicloud.com
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Li Nan <linan122@huawei.com>
Diffstat (limited to 'Documentation/admin-guide')
| -rw-r--r-- | Documentation/admin-guide/md.rst | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Documentation/admin-guide/md.rst b/Documentation/admin-guide/md.rst index 001363f81850..1c2eacc94758 100644 --- a/Documentation/admin-guide/md.rst +++ b/Documentation/admin-guide/md.rst @@ -387,6 +387,8 @@ All md devices contain: No bitmap bitmap The default internal bitmap + llbitmap + The lockless internal bitmap If bitmap_type is not none, then additional bitmap attributes bitmap/xxx or llbitmap/xxx will be created after md device KOBJ_CHANGE event. @@ -447,6 +449,24 @@ If bitmap_type is bitmap, then the md device will also contain: once the array becomes non-degraded, and this fact has been recorded in the metadata. +If bitmap_type is llbitmap, then the md device will also contain: + + llbitmap/bits + This is read-only, show status of bitmap bits, the number of each + value. + + llbitmap/metadata + This is read-only, show bitmap metadata, include chunksize, chunkshift, + chunks, offset and daemon_sleep. + + llbitmap/daemon_sleep + This is read-write, time in seconds that daemon function will be + triggered to clear dirty bits. + + llbitmap/barrier_idle + This is read-write, time in seconds that page barrier will be idled, + means dirty bits in the page will be cleared. + As component devices are added to an md array, they appear in the ``md`` directory as new directories named:: |
