[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20131116051854.GB5618@mtj.dyndns.org>
Date: Sat, 16 Nov 2013 14:18:54 +0900
From: Tejun Heo <tj@...nel.org>
To: Don Morris <don.morris@...com>
Cc: Shawn Bohrer <shawn.bohrer@...il.com>, cgroups@...r.kernel.org,
linux-kernel@...r.kernel.org, Li Zefan <lizefan@...wei.com>,
Mel Gorman <mgorman@...e.de>
Subject: Re: 3.10.16 cgroup css_set_lock deadlock
Hello,
On Fri, Nov 15, 2013 at 09:53:14AM -0500, Don Morris wrote:
> Are we getting some other thread from while_each_task()
> repeatedly keeping us in the loop? Or is there something
> else going on? The gut instinct is that calling something
> like while_each_task() on an exiting thread would either
> reliably give other threads in the group or quit [if the
> thread is the only one left in the group or if an exiting
> thread is no longer part of the group], but since that would
> make the continue work, obviously I'm missing something.
Thread group leaders are stable at that point because threadgroup_lock
is held and are guaranteed to show up in while_each_thread traversal;
however, !leaders may already be in the process of exiting by the time
control reaches that point and may not show up in the iteration. As
RCU lock is held, it'll be *safe* to initiate or continue iteration
from it but when the iteration comes around, there's no guarantee that
it'll be included in it and the term condition depends on it showing
up again. That's what I remember anyway. Li, please correct me if
I'm mistaken.
Thanks.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists