From a kernel perspective this big slowness on shutting down a bcache volume might be caused by a locking / race condition issue. If I read correctly this problem has been reproduced in bionic (and in xenial we even got a kernel oops - it looks like caused by a NULL pointer dereference). I would try to address these issues separately.
About bionic it would be nice to test this commit (also mentioned by @elmo in comment #28):
From a kernel perspective this big slowness on shutting down a bcache volume might be caused by a locking / race condition issue. If I read correctly this problem has been reproduced in bionic (and in xenial we even got a kernel oops - it looks like caused by a NULL pointer dereference). I would try to address these issues separately.
About bionic it would be nice to test this commit (also mentioned by @elmo in comment #28):
https:/ /git.kernel. org/pub/ scm/linux/ kernel/ git/torvalds/ linux.git/ commit/ ?id=eb8cbb6df38 f6e5124a3d5f1f8 a3dbf519537c60
Moreover, even if we didn't get an explicit NULL pointer dereference with bionic, I think it would be interesting to test also the following fixes:
https:/ /git.kernel. org/pub/ scm/linux/ kernel/ git/torvalds/ linux.git/ commit/ ?id=a4b732a248d 12cbdb46999daf0 bf288c011335eb /git.kernel. org/pub/ scm/linux/ kernel/ git/torvalds/ linux.git/ commit/ ?id=1f0ffa67349 c56ea54c03ccfd1 e073c990e7411e /git.kernel. org/pub/ scm/linux/ kernel/ git/torvalds/ linux.git/ commit/ ?id=9951379b0ca 88c95876ad9778b 9099e19a95d566
https:/
https:/
I've already backported all of them and applied to the latest bionic kernel. A test kernel is available here:
https:/ /kernel. ubuntu. com/~arighi/ LP-1796292/
If it doesn't cost too much it would be great to do a test with it. In the meantime I'll try to reproduce the problem locally. Thanks in advance!