On Mon, Feb 15, 2016 at 02:38:09PM +0900, Satoru Takeuchi wrote: > There are some BUG_ON()'s after kmalloc() as follows. > > ===== > foo = kmalloc(); > BUG_ON(!foo); /* -ENOMEM case */ > ===== > > A Docker + memory cgroup user hit these BUG_ON()s. > > https://bugzilla.kernel.org/show_bug.cgi?id=112101 > > Since it's very hard to handle these ENOMEMs properly, > preventing these kmalloc() failures to avoid these > BUG_ON()s for now, are a bit better than the current > implementation anyway.
Beware that the NOFAIL semantics is can cause deadlocks if it's on the critical writeback path or and can be reentered from itself through the reclaim. Unless you're sure that this is not the case, please do not add them just because it would seemingly fix the allocation failures. In the docker example, the memory is limited by cgroups so the NOFAIL mode can exhaust all reserves and just loop endlessly waiting for the OOM killer to get some memory or just waiting without any chance to progress. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html