Re: Found the commit that causes the OOMs

From: KOSAKI Motohiro
Date: Sun Jul 05 2009 - 06:39:24 EST


> >> OK. thanks.
> >> I plan to submit this patch after small more tests. it is useful for OOM analysis.
> >
> > It is also useful for throttling page reclaim.
> >
> > If more than half of the inactive pages in a zone are
> > isolated, we are probably beyond the point where adding
> > additional reclaim processes will do more harm than good.
>
> Maybe we can try limiting the isolation phase of direct reclaims to
> one per CPU?
>
> mutex_lock(per_cpu_lock);
> isolate_pages();
> shrink_page_list();
> put_back_pages();
> mutex_unlock(per_cpu_lock);
>
> This way the isolated pages as well as major parts of direct reclaims
> will be bounded by CPU numbers. The added overheads should be trivial
> comparing to the reclaim costs.

hm, this idea makes performance degression on few CPU machine, I think.

e.g.
if system have only one cpu and sysmtem makes lumpy reclaim, lumpy reclaim
makes synchronous pageout and it makes very long waiting time.

I suspect per-cpu decision is not useful in this area.

thanks.


--
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/