Probably not. I did try something like that over a year ago, and it
didn't work as well as I'd expected. One problem, I think, is that
while it's going through pages already in the swap cache, swapoff
may not need to allocate memory itself; but meanwhile other tasks
are trying to allocate memory and getting OOMkilled. I think that
argues that swapoff does need to register itself for the duration
with the OOMkiller: a PF_ flag achieves that but a __GFP flag does not.
Hugh
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/