From: Sameer Nanda <snanda@chromium.org>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
mhocko@suse.cz, David Rientjes <rientjes@google.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Rusty Russell <rusty@rustcorp.com.au>,
Luigi Semenzato <semenzato@google.com>,
murzin.v@gmail.com, dserrg@gmail.com,
"msb@chromium.org" <msb@chromium.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] mm, oom: Fix race when selecting process to kill
Date: Mon, 11 Nov 2013 15:15:52 -0800 [thread overview]
Message-ID: <CANMivWax_gbt8np_1CMGwZCAB2FR8so7-nimt01PDGy8DWasSA@mail.gmail.com> (raw)
In-Reply-To: <20131109151639.GB14249@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1189 bytes --]
On Sat, Nov 9, 2013 at 7:16 AM, Oleg Nesterov <oleg@redhat.com> wrote:
> On 11/08, Sameer Nanda wrote:
> >
> > @@ -413,12 +413,20 @@ void oom_kill_process(struct task_struct *p, gfp_t
> gfp_mask, int order,
> > DEFAULT_RATELIMIT_BURST);
> > @@ -456,10 +463,18 @@ void oom_kill_process(struct task_struct *p, gfp_t
> gfp_mask, int order,
> > }
> > }
> > } while_each_thread(p, t);
> > - read_unlock(&tasklist_lock);
> >
> > rcu_read_lock();
> > +
> > p = find_lock_task_mm(victim);
> > +
> > + /*
> > + * Since while_each_thread is currently not RCU safe, this unlock
> of
> > + * tasklist_lock may need to be moved further down if any
> additional
> > + * while_each_thread loops get added to this function.
> > + */
> > + read_unlock(&tasklist_lock);
>
> Well, ack... but with this change find_lock_task_mm() relies on tasklist,
> so it makes sense to move rcu_read_lock() down before for_each_process().
> Otherwise this looks confusing, but I won't insist.
>
Agreed that this looks a bit confusing. I will respin the patch.
>
> Oleg.
>
>
--
Sameer
[-- Attachment #2: Type: text/html, Size: 2027 bytes --]
next prev parent reply other threads:[~2013-11-11 23:16 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-05 23:26 [PATCH] mm, oom: Fix race when selecting process to kill Sameer Nanda
2013-11-06 1:18 ` David Rientjes
2013-11-06 1:25 ` Luigi Semenzato
2013-11-06 1:27 ` David Rientjes
2013-11-06 3:00 ` Vladimir Murzin
2013-11-06 3:04 ` Sameer Nanda
2013-11-06 4:45 ` Luigi Semenzato
2013-11-06 7:17 ` Luigi Semenzato
2013-11-06 16:58 ` Sameer Nanda
2013-11-07 0:35 ` David Rientjes
2013-11-07 19:34 ` Sameer Nanda
2013-11-08 18:07 ` [PATCH v2] " Sameer Nanda
2013-11-08 18:45 ` Oleg Nesterov
2013-11-08 19:49 ` [PATCH v3] " Sameer Nanda
2013-11-09 15:16 ` Oleg Nesterov
2013-11-11 23:15 ` Sameer Nanda [this message]
2013-11-12 0:21 ` [PATCH v4] " Sameer Nanda
2013-11-12 15:13 ` Michal Hocko
2013-11-12 20:01 ` Oleg Nesterov
2013-11-12 20:08 ` Sameer Nanda
2013-11-12 20:23 ` [PATCH v5] " Sameer Nanda
2013-11-13 2:33 ` David Rientjes
2013-11-13 16:46 ` Sameer Nanda
2013-11-13 17:18 ` [PATCH v6] " Sameer Nanda
2013-11-13 17:29 ` Oleg Nesterov
2013-11-14 13:43 ` dserrg
2013-11-14 17:03 ` Sameer Nanda
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=CANMivWax_gbt8np_1CMGwZCAB2FR8so7-nimt01PDGy8DWasSA@mail.gmail.com \
--to=snanda@chromium.org \
--cc=akpm@linux-foundation.org \
--cc=dserrg@gmail.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.cz \
--cc=msb@chromium.org \
--cc=murzin.v@gmail.com \
--cc=oleg@redhat.com \
--cc=rientjes@google.com \
--cc=rusty@rustcorp.com.au \
--cc=semenzato@google.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).