[v3,0/5] A few bugfix and cleanup patches for sbitmap

Message ID 20230116205059.3821738-1-shikemeng@huaweicloud.com
Headers
Series A few bugfix and cleanup patches for sbitmap |

Message

Kemeng Shi Jan. 16, 2023, 8:50 p.m. UTC
  Hi, this series contain a bugfix patch to correct wake_batch
recalculation to avoid potential IO hung and a few cleanup patches to
remove unnecessary check and repeat code in sbitmap. Thanks.

---
v3:
 -Thank Jan for review. Collect Reviewed-by from Jan for all patches.
 -some cleanups according to recommends from Jan:
   1)Add Fixes tag in patch 2/5 "sbitmap: remove redundant check in
__sbitmap_queue_get_batch"
   2)Avoid lines over 80 characters in patch 3/5 "sbitmap: rewrite
sbitmap_find_bit_in_index to reduce repeat code"
   3)Remove pointless line in patch 4/5 "sbitmap: add sbitmap_find_bit
to remove repeat code in __sbitmap_get/__sbitmap_get_shallow"

---
v2:
 -add patch "sbitmap: correct wake_batch recalculation to avoid potential
IO hung"
---

Kemeng Shi (5):
  sbitmap: remove unnecessary calculation of alloc_hint in
    __sbitmap_get_shallow
  sbitmap: remove redundant check in __sbitmap_queue_get_batch
  sbitmap: rewrite sbitmap_find_bit_in_index to reduce repeat code
  sbitmap: add sbitmap_find_bit to remove repeat code in
    __sbitmap_get/__sbitmap_get_shallow
  sbitmap: correct wake_batch recalculation to avoid potential IO hung

 lib/sbitmap.c | 102 ++++++++++++++++++++++----------------------------
 1 file changed, 45 insertions(+), 57 deletions(-)
  

Comments

Kemeng Shi Jan. 30, 2023, 1:15 a.m. UTC | #1
Hi Jens. Could you apply this patchset and the patchset "[PATCH v4 0/8]
A few bugfix and cleancode patch for bfq" sent on the same day.

on 1/17/2023 4:50 AM, Kemeng Shi wrote:
> Hi, this series contain a bugfix patch to correct wake_batch
> recalculation to avoid potential IO hung and a few cleanup patches to
> remove unnecessary check and repeat code in sbitmap. Thanks.
> 
> ---
> v3:
>  -Thank Jan for review. Collect Reviewed-by from Jan for all patches.
>  -some cleanups according to recommends from Jan:
>    1)Add Fixes tag in patch 2/5 "sbitmap: remove redundant check in
> __sbitmap_queue_get_batch"
>    2)Avoid lines over 80 characters in patch 3/5 "sbitmap: rewrite
> sbitmap_find_bit_in_index to reduce repeat code"
>    3)Remove pointless line in patch 4/5 "sbitmap: add sbitmap_find_bit
> to remove repeat code in __sbitmap_get/__sbitmap_get_shallow"
> 
> ---
> v2:
>  -add patch "sbitmap: correct wake_batch recalculation to avoid potential
> IO hung"
> ---
> 
> Kemeng Shi (5):
>   sbitmap: remove unnecessary calculation of alloc_hint in
>     __sbitmap_get_shallow
>   sbitmap: remove redundant check in __sbitmap_queue_get_batch
>   sbitmap: rewrite sbitmap_find_bit_in_index to reduce repeat code
>   sbitmap: add sbitmap_find_bit to remove repeat code in
>     __sbitmap_get/__sbitmap_get_shallow
>   sbitmap: correct wake_batch recalculation to avoid potential IO hung
> 
>  lib/sbitmap.c | 102 ++++++++++++++++++++++----------------------------
>  1 file changed, 45 insertions(+), 57 deletions(-)
>
  
Jens Axboe Jan. 30, 2023, 3:04 a.m. UTC | #2
On Tue, 17 Jan 2023 04:50:54 +0800, Kemeng Shi wrote:
> recalculation to avoid potential IO hung and a few cleanup patches to
> remove unnecessary check and repeat code in sbitmap. Thanks.
> 

Applied, thanks!

[1/5] sbitmap: remove unnecessary calculation of alloc_hint in __sbitmap_get_shallow
      commit: f1591a8bb3e02713f4ee2efe20df0d84ed80da48
[2/5] sbitmap: remove redundant check in __sbitmap_queue_get_batch
      commit: 903e86f3a64d9573352bbab2f211fdbbaa5772b7
[3/5] sbitmap: rewrite sbitmap_find_bit_in_index to reduce repeat code
      commit: 08470a98a7d7e32c787b23b87353f13b03c23195
[4/5] sbitmap: add sbitmap_find_bit to remove repeat code in __sbitmap_get/__sbitmap_get_shallow
      commit: 678418c6128f112fc5584beb5cdd21fbc225badf
[5/5] sbitmap: correct wake_batch recalculation to avoid potential IO hung
      commit: b5fcf7871acb7f9a3a8ed341a68bd86aba3e254a

Best regards,