[PATCH 0/1] drbd: fix false positive resync throttling (in-tree 8.4)

Ionut Nechita (Wind River) posted 1 patch 4 weeks, 1 day ago
drivers/block/drbd/drbd_int.h      |  2 -
drivers/block/drbd/drbd_main.c     |  1 -
drivers/block/drbd/drbd_receiver.c | 62 ++++++++++++++++--------------
drivers/block/drbd/drbd_worker.c   |  3 --
4 files changed, 34 insertions(+), 34 deletions(-)
[PATCH 0/1] drbd: fix false positive resync throttling (in-tree 8.4)
Posted by Ionut Nechita (Wind River) 4 weeks, 1 day ago
From: Ionut Nechita <ionut.nechita@windriver.com>

Hi Philipp, Lars, Christoph,

This is the in-tree drbd 8.4 backport of the ap_bio_cnt throttle fix
that was previously sent against drbd 9.3.2.

The drbd 9.x version (using ap_bio_cnt[] array) was Suggested-by me
and Signed-off-by Philipp.  This patch adapts it to the in-tree 8.4
driver where ap_bio_cnt is a scalar atomic_t rather than a per-direction
array.

The fix replaces the racy part_stat/curr_events heuristic in
drbd_rs_c_min_rate_throttle() with a direct check of ap_bio_cnt,
eliminating false-positive throttling that caps resync at c-min-rate
(~35 MB/s) on high-speed links.

Tested on a Distributed Cloud controller (StarlingX, kernel 6.12-rt)
with 10G/100G Mellanox ConnectX-6:
- Before: drbd-dc-vault (100 GB) resync at ~30 MB/s
- After:  drbd-dc-vault resync at ~340-350 MB/s (full link speed)

Based on: linux-6.12.y (6.12.87)

Ionut Nechita (1):
  drbd: fix false positive resync throttling in
    drbd_rs_c_min_rate_throttle

 drivers/block/drbd/drbd_int.h      |  2 -
 drivers/block/drbd/drbd_main.c     |  1 -
 drivers/block/drbd/drbd_receiver.c | 62 ++++++++++++++++--------------
 drivers/block/drbd/drbd_worker.c   |  3 --
 4 files changed, 34 insertions(+), 34 deletions(-)

-- 
2.43.0
Re: [PATCH 0/1] drbd: fix false positive resync throttling (in-tree 8.4)
Posted by Ionut Nechita (Wind River) 4 weeks ago
From: Ionut Nechita <ionut.nechita@windriver.com>

Hi Philipp, Christoph,

Friendly ping on this patch. We are planning to integrate it into our
next release and our engineering team asked whether you could provide
a brief risk assessment or a Reviewed-by tag for the in-tree 8.4
backport.

To summarize the risk profile from our side:

- The change is confined to drbd_rs_c_min_rate_throttle() — only the
  throttle decision, no data path or replication protocol changes.
- Worst-case failure mode (ap_bio_cnt not reflecting reality) is
  equivalent to c-min-rate=0, which is already a supported config.
- The approach is identical to what drbd 9.x already uses.

Could you confirm the patch is correct as-is, or provide a Reviewed-by
/ Acked-by if you're comfortable with it?  If there are any concerns
or suggested changes, happy to spin a v3.

Thanks,
Ionut