All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] offload bios to a thread
@ 2016-07-04 22:53 Mikulas Patocka
  2016-07-04 22:56 ` [PATCH 1/3] block: flush queued bios when process blocks to avoid deadlock Mikulas Patocka
                   ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: Mikulas Patocka @ 2016-07-04 22:53 UTC (permalink / raw)
  To: Alasdair G. Kergon, snitm, Zdenek Kabelac; +Cc: dm-devel

Hi

This is the second version of patches that fix deadlocks by redirecting 
bios from current->bio_list to rescuer workqueues.

I found out that the original patches caused deadlock with the loopback 
device. When the loopback device is used, both lower and upper filesystems 
use the same bio set - fs_bio_set. Consequently, bios submitted by both of 
them end up on the same rescuer workqueue. There is a deadlock possibility 
- if generic_make_request for the upper filesystem's bio blocks (because 
there are too many requests in flight on the loop device), it may stall 
processing some bios for the lower filesystem.

Ideadlly, each filesystem should have its own bio set. But it doesn't. So 
I fix this problem by not offloading bios allocated from fs_bio_set.

Mikulas

^ permalink raw reply	[flat|nested] 19+ messages in thread
* [PATCH 0/3] offload bios to a thread
@ 2016-06-29  0:16 Mikulas Patocka
  2016-06-30 19:40   ` Mike Snitzer
  0 siblings, 1 reply; 19+ messages in thread
From: Mikulas Patocka @ 2016-06-29  0:16 UTC (permalink / raw)
  To: Alasdair G. Kergon, Mike Snitzer, Zdenek Kabelac; +Cc: dm-devel

Hi

Here I'm sending three patches to fix the deadlocks in snapshot and 
snapshot-merge.

The first patch fixes the deadlock, the following 2 patches introduce a 
timer, so that bios are not offloaded immediatelly, they are offloaded 
after a specified timeout, because immediate offloading can change order 
of bios and it could theoretically produce regressions. I don't know if 
these regressions really exist or not.

If there is some way to push the patches upstream, try it.

Mikulas

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

end of thread, other threads:[~2016-07-06 15:23 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-04 22:53 [PATCH 0/3] offload bios to a thread Mikulas Patocka
2016-07-04 22:56 ` [PATCH 1/3] block: flush queued bios when process blocks to avoid deadlock Mikulas Patocka
2016-07-04 22:58 ` [PATCH 2/3] block: prepare for timed bio offload Mikulas Patocka
2016-07-04 22:59 ` [PATCH 3/3] block: use timed offload Mikulas Patocka
2016-07-06 13:36 ` [PATCH 0/3] offload bios to a thread Mike Snitzer
2016-07-06 13:53   ` Mikulas Patocka
2016-07-06 13:55     ` Mike Snitzer
2016-07-06 15:23       ` Mikulas Patocka
  -- strict thread matches above, loose matches on Subject: below --
2016-06-29  0:16 Mikulas Patocka
2016-06-30 19:40 ` Mike Snitzer
2016-06-30 19:40   ` Mike Snitzer
2016-06-30 23:15   ` Mike Snitzer
2016-06-30 23:15     ` Mike Snitzer
2016-07-04  8:09     ` Lars Ellenberg
2016-07-04  8:09       ` Lars Ellenberg
2016-07-04 22:27       ` Mikulas Patocka
2016-07-04 22:27         ` Mikulas Patocka
2016-07-04 22:45   ` Mikulas Patocka
2016-07-04 22:45     ` Mikulas Patocka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.