From: Andre Noll <maan@tuebingen.mpg.de>
To: Kai Krakow <hurikhan77@gmail.com>
Cc: linux-bcache@vger.kernel.org,
Kent Overstreet <kent.overstreet@gmail.com>,
Jan Wiele <jan@wiele.org>
Subject: Re: Hang in bcache/qemu
Date: Wed, 18 Jan 2017 09:48:30 +0100 [thread overview]
Message-ID: <20170118084830.GA3690@tuebingen.mpg.de> (raw)
In-Reply-To: <20170118043556.08485efe@jupiter.sol.kaishome.de>
[-- Attachment #1: Type: text/plain, Size: 2592 bytes --]
On Wed, Jan 18, 04:35, Kai Krakow wrote
> > Mainboard: Asrock Rack EP2C602
> > CPU: 2x Intel Xeon E5-2670
> > Linux: 4.8.13-1-ARCH
> > Cache-device: Partition on Samsung SSD 850 EVO 500GB
> > Backing-device: 500GB Western Digital Black
> >
> >
> > Bcache is running in writeback mode. On top of bcache, I'm running
> > LVM, which provides a Games-LV for a Qemu Windows-10 VM (Games-HD
> > with drive letter 'D'. Drive C is hosted on a non-bcache block
> > device. Each VM has its own GPU via passthrough). For a second/third
> > VM, I create snapshots of the Games-LV.
> >
> > When playing the game Overwatch, the first VM suddenly stops to
> > respond (after about >20min), some seconds later the second VM, too.
> >
> > Currently I'm not near the machine with the problem, but I'm
> > appending as much information as possible.
>
> Bcache doesn't seem to be involved in the backtrace - at least I
> couldn't spot it but I'm not a kernel dev. Are you maybe using bfq
> block scheduler? Try to switch to deadline and see if the problem
> persists. I personally had similar problems with bfq.
Bcache IS involved. E.g.
> > [ 4068.253203] Call Trace:
> > [ 4068.253205] [<ffffffff815f40ec>] schedule+0x3c/0x90
> > [ 4068.253207] [<ffffffff815f67f2>] rwsem_down_write_failed+0x132/0x2b0
> > [ 4068.253209] [<ffffffff8130bb37>] call_rwsem_down_write_failed+0x17/0x30
> > [ 4068.253211] [<ffffffff815f5f44>] down_write+0x24/0x40
> > [ 4068.253214] [<ffffffffa005747b>] bch_writeback_thread+0x6b/0x7f0 [bcache]
> > [ 4068.253218] [<ffffffffa0057410>] ? write_dirty+0xb0/0xb0 > > [bcache]
> > [ 4068.253220] [<ffffffff8109be38>] kthread+0xd8/0xf0
> > [ 4068.253221] [<ffffffff8102c782>] ? __switch_to+0x2d2/0x630
> > [ 4068.253223] [<ffffffff815f823f>] ret_from_fork+0x1f/0x40
> > [ 4068.253225] [<ffffffff8109bd60>] ? kthread_worker_fn+0x170/0x170
FWIW, I'm seeing this as well on different hardware, and with both
deadline and CFQ, so it's not a scheduler issue. The problem seems to
be the bcache writeback thread calling down_write(&dc->writeback_lock)
while already holding this lock.
Calling down_write_trylock() instead of plain down_write() and
scheduling an interruptible timeout if ->writeback_lock could not be
acquired seems to cure the problem. This only papers over the real
bug though, so that's not a proper solution.
Kent: Any idea?
Thanks
Andre
--
Max Planck Institute for Developmental Biology
Spemannstraße 35, 72076 Tübingen, Germany. Phone: (+49) 7071 601 829
http://people.tuebingen.mpg.de/maan/
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next prev parent reply other threads:[~2017-01-18 9:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-11 17:34 Hang in bcache/qemu Jan Wiele
2017-01-18 3:35 ` Kai Krakow
2017-01-18 8:48 ` Andre Noll [this message]
2017-01-19 12:22 ` Jan Wiele
2017-01-19 13:42 ` Kent Overstreet
2017-01-19 14:06 ` Jan Wiele
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170118084830.GA3690@tuebingen.mpg.de \
--to=maan@tuebingen.mpg.de \
--cc=hurikhan77@gmail.com \
--cc=jan@wiele.org \
--cc=kent.overstreet@gmail.com \
--cc=linux-bcache@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox