Re: [PATCH] mm: Throttle shrinkers harder

Dave Hansen
2014-04-28T16:39:00Z

On 04/26/2014 06:10 AM, Chris Wilson wrote:
>>> > > Thanks for the pointer to
>>> > > register_oom_notifier(), I can use that to make sure that we do purge
>>> > > everything from the GPU, and do a sanity check at the same time, before
>>> > > we start killing processes.
>> >
>> > Actually, that one doesn't get called until we're *SURE* we are going to
>> > OOM. Any action taken in there won't be taken in to account.
> blocking_notifier_call_chain(&oom_notify_list, 0, &freed);
> if (freed > 0)
> /* Got some memory back in the last second. */
> return;
>
> That looks like it should abort the oom and so repeat the allocation
> attempt? Or is that too hopeful?

You're correct. I was reading the code utterly wrong.