[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160530071357.GE22928@dhcp22.suse.cz>
Date: Mon, 30 May 2016 09:13:57 +0200
From: Michal Hocko <mhocko@...nel.org>
To: Vladimir Davydov <vdavydov@...tuozzo.com>
Cc: linux-mm@...ck.org,
Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
David Rientjes <rientjes@...gle.com>,
Oleg Nesterov <oleg@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 4/6] mm, oom: skip over vforked tasks
On Fri 27-05-16 19:48:30, Vladimir Davydov wrote:
> On Thu, May 26, 2016 at 02:40:13PM +0200, Michal Hocko wrote:
[...]
> > @@ -839,6 +841,13 @@ void oom_kill_process(struct oom_control *oc, struct task_struct *p,
> > for_each_process(p) {
> > if (!process_shares_mm(p, mm))
> > continue;
> > + /*
> > + * vforked tasks are ignored because they will drop the mm soon
> > + * hopefully and even if not they will not mind being oom
> > + * reaped because they cannot touch any memory.
>
> They shouldn't modify memory, but they still can touch it AFAIK.
You are right. This means that the vforked child might see zero pages.
Let me think whether this is acceptable or not.
Thanks!
>
> > + */
> > + if (p->vfork_done)
> > + continue;
> > if (same_thread_group(p, victim))
> > continue;
> > if (unlikely(p->flags & PF_KTHREAD) || is_global_init(p) ||
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists