LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: linux-mm@kvack.org, Roman Gushchin <guro@fb.com>,
David Rientjes <rientjes@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.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
Date: Tue, 30 Oct 2018 07:31:36 +0100 [thread overview]
Message-ID: <20181030063136.GU32673@dhcp22.suse.cz> (raw)
In-Reply-To: <201810300445.w9U4jMhu076672@www262.sakura.ne.jp>
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
next prev parent reply other threads:[~2018-10-30 6:31 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-25 8:24 [RFC PATCH v2 0/3] oom: rework oom_reaper vs. exit_mmap handoff Michal Hocko
2018-10-25 8:24 ` [RFC PATCH v2 1/3] mm, oom: rework mmap_exit vs. oom_reaper synchronization Michal Hocko
2018-10-25 8:24 ` [RFC PATCH v2 2/3] mm, oom: keep retrying the oom_reap operation as long as there is substantial memory left Michal Hocko
2018-10-25 8:24 ` [RFC PATCH v2 3/3] mm, oom: hand over MMF_OOM_SKIP to exit path if it is guranteed to finish Michal Hocko
2018-10-30 4:45 ` Tetsuo Handa
2018-10-30 6:31 ` Michal Hocko [this message]
2018-10-30 9:47 ` Tetsuo Handa
2018-10-30 11:39 ` Michal Hocko
2018-10-30 12:02 ` Tetsuo Handa
2018-10-30 12:10 ` Michal Hocko
2018-10-30 13:57 ` Tetsuo Handa
2018-10-30 14:23 ` Michal Hocko
2018-11-08 9:32 ` [RFC PATCH v2 0/3] oom: rework oom_reaper vs. exit_mmap handoff Michal Hocko
2018-11-14 9:46 ` Tetsuo Handa
2018-11-14 10:16 ` Michal Hocko
2018-11-15 9:54 ` Tetsuo Handa
2018-11-15 11:36 ` Michal Hocko
2018-11-16 10:06 ` Tetsuo Handa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181030063136.GU32673@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=guro@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=rientjes@google.com \
--subject='Re: [RFC PATCH v2 3/3] mm, oom: hand over MMF_OOM_SKIP to exit path if it is guranteed to finish' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).