Re: [PATCH 3/8] mm,oom: Use list of mm_struct used by OOM victims.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tetsuo,

I am already sleeping and had a lot of beer ;) but let me try to (partly) reply anyway.

On 07/05, Tetsuo Handa wrote:
>
> Oleg Nesterov wrote:
> >
> > This new version doesn't apply on top of 2/8, I can't really understand it...
>
> This new version is not for on top of 2/8, but squashed of all [1-8]/8 patches.

Ah, OK, I'll try to take a look tomorrow.

> > > +void exit_oom_mm(struct mm_struct *mm)
> > > +{
> > > +	/* Nothing to do unless mark_oom_victim() was called with this mm. */
> > > +	if (!mm->oom_mm.victim)
> > > +		return;
> > > +#ifdef CONFIG_MMU
> > > +	/*
> > > +	 * OOM reaper will eventually call __exit_oom_mm().
> > > +	 * Allow oom_has_pending_mm() to ignore this mm.
> > > +	 */
> > > +	set_bit(MMF_OOM_REAPED, &mm->flags);
> >
> > If the caller is exit_mm(), then mm->mm_users == 0 and oom_has_pending_mm()
> > can check it is zero instead?
>
> I don't think so. Setting MMF_OOM_REAPED indicates that memory used by that
> mm is already reclaimed by the OOM reaper or by __mmput().

Sure, this is clear,

> mm->mm_users == 0
> alone does not mean memory used by that mm is already reclaimed.
  ^^^^^

Of course! I meant that oom_has_pending_mm() can check _both_ mm_users and
MMF_OOM_REAPED and then we do not need to set MMF_OOM_REAPED in exit_mm() path.

No?

> Making exit_oom_mm() a no-op for CONFIG_MMU=y would be OK,

Yes. Not only because this can simplify other changes. I do believe that the less
"oom" hooks we have the better, even if this needs some complications in oom_kill.c.

For example, this series removes the extra try_to_freeze_tasks() from freeze_processes()
(which is in fact the "oom" hook) and personally I do like this fact.

And. Of course I am not sure this is possible, but to me it would be very nice
to kill oom_reaper_list altogether if CONFIG_MMU=n.

Oleg.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]