On 17/09/15 19:31, Kent Overstreet wrote: > Here's an updated patch that has a fix for _that_ theory, and also a new > BUG_ON(). Any chance you could test it? I've applied your patch (to the Ubuntu 4.2.1 tree - since I need some of their non-mainline apparmour changes on this box) , and it's stopped the excessive CPU usage by the bcache_writebac thread. I'd first experienced this CPU spinning when I tried to disable cache usage (I'd had some lockups on the machine and I was trying to get to debug, so I tried switching bcache cache_mode to none whilst I debugged as part of my process of elimination). I assume the bug was hit whilst trying to flush the dirty cache data. I now have: root@magic:~# cat /sys/block/bcache0/bcache/state clean root@magic:~# cat /sys/block/bcache0/bcache/dirty_data 1.5M root@magic:~# cat /sys/block/bcache0/bcache/cache_mode writethrough writeback writearound [none] root@magic:~# uname -a Linux magic 4.2.1 #2 SMP Sat Sep 26 10:00:40 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux i.e. state and cache_mode are inconsistent with dirty_data. Is this of any concern and/or likely to cause problems if I re-enable the cache? Cheers, Tim. -- To unsubscribe from this list: send the line "unsubscribe linux-bcache" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html