diff options
author | Lars Ellenberg <lars.ellenberg@linbit.com> | 2016-06-14 01:26:38 +0300 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-06-14 06:43:08 +0300 |
commit | 27ea1d876e16c0ca5ae6335fc85cf4f278f5c98c (patch) | |
tree | cf6bc0c2019b0b573ca90112003976063d480884 /drivers/block/drbd/drbd_actlog.c | |
parent | 13c2088d41e9c63e1a484a08a1d250ff74b299b5 (diff) | |
download | linux-27ea1d876e16c0ca5ae6335fc85cf4f278f5c98c.tar.xz |
drbd: al_write_transaction: skip re-scanning of bitmap page pointer array
For larger devices, the array of bitmap page pointers can grow very
large (8000 pointers per TB of storage).
For each activity log transaction, we need to flush the associated
bitmap pages to stable storage. Currently, we just "mark" the respective
pages while setting up the transaction, then tell the bitmap code to
write out all marked pages, but skip unchanged pages.
But one such transaction can affect only a small number of bitmap pages,
there is no need to scan the full array of several (ten-)thousand
page pointers to find the few marked ones.
Instead, remember the index numbers of the few affected pages,
and later only re-check those to skip duplicates and unchanged ones.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block/drbd/drbd_actlog.c')
-rw-r--r-- | drivers/block/drbd/drbd_actlog.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_actlog.c b/drivers/block/drbd/drbd_actlog.c index f9af555f9e69..0a1aaf8c24c4 100644 --- a/drivers/block/drbd/drbd_actlog.c +++ b/drivers/block/drbd/drbd_actlog.c @@ -341,6 +341,8 @@ static int __al_write_transaction(struct drbd_device *device, struct al_transact i = 0; + drbd_bm_reset_al_hints(device); + /* Even though no one can start to change this list * once we set the LC_LOCKED -- from drbd_al_begin_io(), * lc_try_lock_for_transaction() --, someone may still |