Re: [Patch] x86,mm: check freeze request in page fault handler

From: Michal Hocko
Date: Fri Aug 15 2014 - 04:36:40 EST


On Wed 13-08-14 17:26:48, Cong Wang wrote:
> On Wed, Aug 13, 2014 at 2:36 AM, Michal Hocko <mhocko@xxxxxxx> wrote:
> > On Tue 12-08-14 17:47:02, Cong Wang wrote:
> > [...]
> >> Does the following updated patch make any sense to you? If not, I will just
> >> drop it.
> >
> > Not really to be honest. I do not see what problem you are trying to fix.
> >
>
> In my case, a page faulted process triggered OOM, kernel kept retrying
> this fault since without my fix oom killer couldn't kill a frozen
> process.
> This led to that this process is always running even after we tried to
> freeze it, the whole memory cgroup just stayed in FREEZING state.
>
> Although with my fix, OOM will kill the frozen process so that the
> page faulted process could probably stop retrying the fault finally,
> the question is that is OOM the only case blocks page fault? Looking
> at the code, there could be other case blocking page fault handler
> as well, so instead of keep retrying for unknown times with ignoring
> freeze request, why not just freeze it since this is not dangerous?

I do not think that spreading freezing points is a good idea. The task
can be blocked during page fault for many other reasons so this point
doesn't solve anything IMO.

> Or I am missing anything?

Page fault shouldn't retry too many times without returning to
userspace.
--
Michal Hocko
SUSE Labs
--
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/