Re: [PATCH] cpusets: Allocate heap only when required

From: Tejun Heo
Date: Fri Jan 24 2014 - 05:36:39 EST


On Fri, Jan 24, 2014 at 02:33:27AM -0800, David Rientjes wrote:
> It's not harmless, if heap_init() fails with -ENOMEM then the write fails
> even though it may not be for memory_spread_page or memory_spread_slab,
> which is the minority of the callers of this function.

And depending on details like that would actually be more harmful.
Please remember that all writes through cgroupfs may fail under very
high memory pressure. There's no "this specific set of writes to this
specific knob isn't affected by memory pressure" guarantee.

Thanks.

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/