mbox series

[0/3] bcache fixes for Linux v5.19 (2nd wave)

Message ID 20220527152818.27545-1-colyli@suse.de (mailing list archive)
Headers show
Series bcache fixes for Linux v5.19 (2nd wave) | expand

Message

Coly Li May 27, 2022, 3:28 p.m. UTC
Hi Jens,

Here are the 2nd wave bcache fixes for Linux v5.19, they just survives
from my I/O pressure testing and look fine.

The patch from Jia-Ju Bai is in my testing queue for a while, it handles
a memory allocation failure in the I/O path on a backing device when it
is not attached to cache device.

My first patch adds memset() to zero clean the on-stack local variables
to keep the code logic consistent as they were previously allocated by
kzalloc() dynamically.

The second patch from me is an effort to avoid bogus soft lockup warning
in kernel message. Indeed the busy writeback thread starves writeback
I/O rate calculation kwork doesn't hurt anything, but the kernel message
with trace information scares users time to time, makes them to worry
about something wrong with bcache. This patch permit the writeback rate
update kworker to retry longer times before finally competing the write-
back lock with writeback thread, to avoid the unnecessary soft lockup
warning information.

There is no more patch in my plan for Linux v5.19. Please consider to
take them, and thank you in advance.

Coly Li (2):
  bcache: memset on stack variables in bch_btree_check() and
    bch_sectors_dirty_init()
  bcache: avoid unnecessary soft lockup in kworker
    update_writeback_rate()

Jia-Ju Bai (1):
  md: bcache: check the return value of kzalloc() in
    detached_dev_do_request()

 drivers/md/bcache/bcache.h    |  7 ++++++
 drivers/md/bcache/btree.c     |  1 +
 drivers/md/bcache/request.c   |  6 +++++
 drivers/md/bcache/writeback.c | 46 +++++++++++++++++++++++++++++++----
 4 files changed, 55 insertions(+), 5 deletions(-)

Comments

Jens Axboe May 27, 2022, 3:50 p.m. UTC | #1
On Fri, 27 May 2022 23:28:15 +0800, Coly Li wrote:
> Here are the 2nd wave bcache fixes for Linux v5.19, they just survives
> from my I/O pressure testing and look fine.
> 
> The patch from Jia-Ju Bai is in my testing queue for a while, it handles
> a memory allocation failure in the I/O path on a backing device when it
> is not attached to cache device.
> 
> [...]

Applied, thanks!

[1/3] bcache: memset on stack variables in bch_btree_check() and bch_sectors_dirty_init()
      commit: 7d6b902ea0e02b2a25c480edf471cbaa4ebe6b3c
[3/3] md: bcache: check the return value of kzalloc() in detached_dev_do_request()
      commit: 40f567bbb3b0639d2ec7d1c6ad4b1b018f80cf19

Best regards,