Re: 4.8.8 kernel trigger OOM killer repeatedly when I have lots of RAM that should be free

From: Tejun Heo
Date: Wed Nov 30 2016 - 15:30:25 EST


Hello,

On Wed, Nov 30, 2016 at 10:14:50AM -0800, Linus Torvalds wrote:
> Tejun/Kent - any way to just limit the workqueue depth for bcache?
> Because that really isn't helping, and things *will* time out and
> cause those problems when you have hundreds of IO's queued on a disk
> that likely as a write iops around ~100..

Yeah, easily. I'm assuming it's gonna be the bcache_wq allocated in
from bcache_init(). It's currently using 0 as @max_active and it can
set to be any arbitrary number. It'd be a very crude way to control
what looks like a buffer bloat with IOs tho. We can make it a bit
more granular by splitting workqueues per bcache instance / purpose
but for the long term the right solution seems to be hooking into
writeback throttling mechanism that block layer just grew recently.

Thanks.

--
tejun