linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* make block layer auto-PI deadlock safe
@ 2025-10-23  8:08 Christoph Hellwig
  2025-10-23  8:08 ` [PATCH 1/3] slab, block: generalize bvec_alloc_gfp Christoph Hellwig
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Christoph Hellwig @ 2025-10-23  8:08 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Vlastimil Babka, Andrew Morton, Christoph Lameter,
	David Rientjes, Roman Gushchin, Harry Yoo, Martin K. Petersen,
	linux-block, linux-mm

Hi all,

currently the automatic block layer PI generation allocates the integrity
buffer using kmalloc, and thus could deadlock, or fail I/O request due
to memory pressure.

Fix this by adding a mempool, and capping the maximum I/O size on PI
capable devices to not exceed the allocation size of the mempool.

This is against the block-6.18 branch as it has a contextual dependency
on the PI fix merged there yesterday.

Diffstat:
 block/bio-integrity-auto.c    |   26 ++---------------------
 block/bio-integrity.c         |   47 ++++++++++++++++++++++++++++++++++++++++++
 block/bio.c                   |   13 +----------
 block/blk-settings.c          |   11 +++++++++
 include/linux/bio-integrity.h |    6 +++++
 include/linux/blk-integrity.h |    5 ++++
 include/linux/slab.h          |   10 ++++++++
 7 files changed, 84 insertions(+), 34 deletions(-)


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2025-10-27 13:14 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-23  8:08 make block layer auto-PI deadlock safe Christoph Hellwig
2025-10-23  8:08 ` [PATCH 1/3] slab, block: generalize bvec_alloc_gfp Christoph Hellwig
2025-10-24  1:44   ` Martin K. Petersen
2025-10-24  8:38   ` Vlastimil Babka
2025-10-24  9:05     ` Christoph Hellwig
2025-10-26 21:19   ` Matthew Wilcox
2025-10-27  6:47     ` Christoph Hellwig
2025-10-27 13:09       ` Matthew Wilcox
2025-10-27 13:14         ` Christoph Hellwig
2025-10-23  8:08 ` [PATCH 2/3] block: blocking mempool_alloc doesn't fail Christoph Hellwig
2025-10-24  1:45   ` Martin K. Petersen
2025-10-23  8:08 ` [PATCH 3/3] block: make bio auto-integrity deadlock safe Christoph Hellwig
2025-10-24  1:47   ` Martin K. Petersen
2025-10-27  6:03   ` Kanchan Joshi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox