Thread (59 messages) 59 messages, 7 authors, 2022-04-30

Re: [PATCH v2 09/12] md/raid5: Keep a reference to last stripe_head for batch

From: Christoph Hellwig <hch@infradead.org>
Date: 2022-04-21 06:17:46
Also in: lkml

On Wed, Apr 20, 2022 at 01:54:22PM -0600, Logan Gunthorpe wrote:
When batching, every stripe head has to find the previous stripe head to
add to the batch list. This involves taking the hash lock which is
highly contended during IO.

Instead of finding the previous stripe_head each time, store a
reference to the previous stripe_head in a pointer so that it doesn't
require taking the contended lock another time.

The reference to the previous stripe must be released before scheduling
and waiting for work to get done. Otherwise, it can hold up
raid5_activate_delayed() and deadlock.
Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help