Re: Improving OOM killer

Minchan Kim
2010-02-03T16:06:34Z

On Thu, 2010-02-04 at 00:00 +0900, Minchan Kim wrote:
> On Wed, 2010-02-03 at 17:55 +0530, Balbir Singh wrote:
> > * Lubos Lunak <l.lunak@suse.cz> [2010-02-03 13:10:27]:
> >> > I don't understand how this matters. Overcommit is memory for which address
> > > space has been allocated but not actual memory, right? Then that's exactly
> > > what I'm claiming is wrong and am trying to reverse. Currently OOM killer
> > > takes this into account because it uses VmSize, but IMO it shouldn't - if a
> > > process does malloc(400M) but then it uses only a tiny fraction of that, in
> > > the case of memory shortage killing that process does not solve anything in
> > > practice.
> >
> > We have a way of tracking commmitted address space, which is more
> > sensible than just allocating memory and is used for tracking
> > overcommit. I was suggesting that, that might be a better approach.
>
> Yes. It does make sense. At least total_vm doesn't care about
> MAP_NORESERVE case. But unfortunately, it's a per CPU not per Process.

Sorry for confusing. It was opposite. I slept :)
The commited as doesn't care about MAP_NORESERVE case.
But it definitely charges memory. so I think total_vm is better than
committed as if we really have to use vmsize heuristic continuously.

But I am not sure that i understand your point about overcommit policy.

--
Kind regards,
Minchan Kim