[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181030063136.GU32673@dhcp22.suse.cz>
Date: Tue, 30 Oct 2018 07:31:36 +0100
From: Michal Hocko <mhocko@...nel.org>
To: Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
Cc: linux-mm@...ck.org, Roman Gushchin <guro@...com>,
David Rientjes <rientjes@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH v2 3/3] mm, oom: hand over MMF_OOM_SKIP to exit path
if it is guranteed to finish
On Tue 30-10-18 13:45:22, Tetsuo Handa wrote:
> Michal Hocko wrote:
> > @@ -3156,6 +3166,13 @@ void exit_mmap(struct mm_struct *mm)
> > vma = remove_vma(vma);
> > }
> > vm_unacct_memory(nr_accounted);
> > +
> > + /*
> > + * Now that the full address space is torn down, make sure the
> > + * OOM killer skips over this task
> > + */
> > + if (oom)
> > + set_bit(MMF_OOM_SKIP, &mm->flags);
> > }
> >
> > /* Insert vm structure into process list sorted by address
>
> I don't like setting MMF_OOF_SKIP after remove_vma() loop. 50 users might
> call vma->vm_ops->close() from remove_vma(). Some of them are doing fs
> writeback, some of them might be doing GFP_KERNEL allocation from
> vma->vm_ops->open() with a lock also held by vma->vm_ops->close().
>
> I don't think that waiting for completion of remove_vma() loop is safe.
What do you mean by 'safe' here?
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists