lkml.org 
[lkml]   [2018]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [v2 PATCH] mm: introduce arg_lock to protect arg_start|end and env_start|end in mm_struct
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.

\
 
 \ /
  Last update: 2018-03-27 09:38    [W:0.055 / U:4.364 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site