linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Yang Shi <yang.shi@linux.alibaba.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
	willy@infradead.org, adobriyan@gmail.com, mhocko@kernel.org,
	mguzik@redhat.com, akpm@linux-foundation.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [v2 PATCH] mm: introduce arg_lock to protect arg_start|end and env_start|end in mm_struct
Date: Tue, 27 Mar 2018 10:38:34 +0300	[thread overview]
Message-ID: <20180327073834.GI2236@uranus> (raw)
In-Reply-To: <ceaa72ee-a63a-983b-d040-387886f5599c@linux.alibaba.com>

On Mon, Mar 26, 2018 at 06:12:55PM -0400, Yang Shi wrote:
> > +	if (unlikely(arg_start > arg_end || env_start > env_end)) {
> > +		cond_resched();
> > +		goto retry;
> 
> Can't it trap into dead loop if the condition is always false?

Yes, unfortunately it can.

> > +	}
> > 
> > for reading these fields.
> > 
> > By the way, /proc/pid/ readers are serving as a canary who tells something
> > mm_mmap related problem is happening. On the other hand, it is sad that
> > such canary cannot be terminated by signal due to use of unkillable waits.
> > I wish we can use killable waits.
> 
> I already proposed patches (https://lkml.org/lkml/2018/2/26/1197) to do this
> a few weeks ago. In the review, akpm suggested mitigate the mmap_sem
> contention instead of using killable version workaround. Then the
> preliminary unmaping by section patches
> (https://lkml.org/lkml/2018/3/20/786) were proposed. In the discussion, we
> decided to eliminate the mmap_sem abuse, this is where the patch came from.

  reply	other threads:[~2018-03-27  7:38 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-26 18:20 [v2 PATCH] mm: introduce arg_lock to protect arg_start|end and env_start|end in mm_struct Yang Shi
2018-03-26 18:37 ` Matthew Wilcox
2018-03-26 19:21   ` Cyrill Gorcunov
2018-03-26 21:10     ` Tetsuo Handa
2018-03-26 21:20       ` Yang Shi
2018-03-26 21:29       ` Cyrill Gorcunov
2018-03-26 22:00         ` Tetsuo Handa
2018-03-26 22:12           ` Yang Shi
2018-03-27  7:38             ` Cyrill Gorcunov [this message]
2018-03-27  7:37           ` Cyrill Gorcunov
2018-03-26 21:59     ` Yang Shi
2018-03-27  7:32       ` Cyrill Gorcunov
2018-03-27 18:44         ` Yang Shi
2018-03-26 19:42 ` Mateusz Guzik
2018-03-26 21:10   ` Yang Shi
2018-03-27  6:29 ` Michal Hocko
2018-03-27 14:31   ` Mateusz Guzik
2018-03-27 14:43     ` Michal Hocko
2018-03-27 18:38   ` Yang Shi
2018-03-27 18:52     ` Cyrill Gorcunov
2018-03-28 13:10       ` Michal Hocko
2018-04-02  1:58   ` Yang Shi

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=20180327073834.GI2236@uranus \
    --to=gorcunov@gmail.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mguzik@redhat.com \
    --cc=mhocko@kernel.org \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    --cc=willy@infradead.org \
    --cc=yang.shi@linux.alibaba.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).