OK to set PF_MEMDIE on cleanup tasks?

From: Paul E. McKenney
Date: Tue Oct 14 2003 - 17:22:32 EST


Hello!

We have tasks that actively return memory to the system, which we
would like to exempt from the OOM killer, as killing such tasks under
low-memory conditions would indeed be counterproductive. It looks like
the "official" way to do this is to catch/ignore signal 15, which results
in PF_MEMDIE being set (in the 2.6 kernel), thus preventing the OOM killer
from killing the task again. I don't see where PF_MEMDIE is cleared,
though there are a number of subtle ways one might do this that I would
have missed.

So... Is it considered legit to simply set PF_MEMDIE when creating
the cleanup task? Or is there some reason that one should deal with
signal 15?

All enlightenment much appreciated!

Thanx, Paul
-
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/