Messages in this thread | | | Date | Thu, 26 May 2011 13:22:26 -0700 (PDT) | From | David Rientjes <> | Subject | Re: [PATCH] trace: Set oom_score_adj to maximum for ring buffer allocating process |
| |
On Thu, 26 May 2011, Steven Rostedt wrote:
> Hmm, have you tried this in practice? Yes we may kill the "echo" command > but it doesn't stop the ring buffer from being allocated, and thus > killing the echo command may not be enough, and those critical processes > that you are trying to protect will be killed next. > > Perhaps we should change the allocation of the ring buffer or detect OOM > triggering. Maybe make all the allocations ATOMIC, thus it will be > either available or not, and fail instead of trying to swap out other > memory for the allocation. >
My impression of this was that it was attempting to avoid killing a different process by means of the oom killer rather than avoiding swap. I don't think there's anything wrong with using GFP_KERNEL, but I'd suggest also using __GFP_NORETRY so the allocation calls into direct reclaim but will avoid oom killing anything and simply failing instead.
| |