From d774f1e1f05d13b08b2967cf1148f8e815d4aee0 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 16 Mar 2023 18:38:40 +0000 Subject: [PATCH] Revert "Revert "sbitmap: correct wake_batch recalculation to avoid potential IO hung"" This reverts commit f12f3bc9c72b815cad132b8715df3c480397ff99. It was perserving the ABI, but that is not needed anymore at this point in time. Change-Id: Idfe61bf8ce3a83c66c31769b845572454f0f196b Signed-off-by: Greg Kroah-Hartman --- lib/sbitmap.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/sbitmap.c b/lib/sbitmap.c index a7c3dc3d2d17..e918cd8695f1 100644 --- a/lib/sbitmap.c +++ b/lib/sbitmap.c @@ -464,13 +464,10 @@ void sbitmap_queue_recalculate_wake_batch(struct sbitmap_queue *sbq, unsigned int users) { unsigned int wake_batch; - unsigned int min_batch; unsigned int depth = (sbq->sb.depth + users - 1) / users; - min_batch = sbq->sb.depth >= (4 * SBQ_WAIT_QUEUES) ? 4 : 1; - wake_batch = clamp_val(depth / SBQ_WAIT_QUEUES, - min_batch, SBQ_WAKE_BATCH); + 1, SBQ_WAKE_BATCH); WRITE_ONCE(sbq->wake_batch, wake_batch); }