Re: How to handle TIF_MEMDIE stalls?

Theodore Ts'o
2015-02-28T16:42:08Z

On Sat, Feb 28, 2015 at 11:29:43AM -0500, Johannes Weiner wrote:
>
> I'm trying to figure out if the current nofail allocators can get
> their memory needs figured out beforehand. And reliably so - what
> good are estimates that are right 90% of the time, when failing the
> allocation means corrupting user data? What is the contingency plan?

In the ideal world, we can figure out the exact memory needs
beforehand. But we live in an imperfect world, and given that block
devices *also* need memory, the answer is "of course not". We can't
be perfect. But we can least give some kind of hint, and we can offer
to wait before we get into a situation where we need to loop in
GFP_NOWAIT --- which is the contingency/fallback plan.

I'm sure that's not very satisfying, but it's better than what we have
now.

- Ted