lkml.org 
[lkml]   [2016]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: cleanup_net()/net_mutex hung tasks + kobject release debugging
On Thu, Jul 21, 2016 at 02:43:34PM +0200, Vegard Nossum wrote:

> The rules for net_mutex are very simple, it's used in very few places so
> I don't see how the locking could get messed up there. I'll buy your
> theory that the lock is held for a long time if there are a lot of
> namespaces to iterate over. I decided to time it myself and it seems
> that cleanup_net() can hold the mutex for 30-40 seconds at a time, which
> is surely wrong.

> so on a hunch I disabled DEBUG_KOBJECT_RELEASE, and that does indeed
> solve the problem -- cleanup_net() still holds the mutex for fairly
> long, but only up to max ~5 seconds at a time as opposed to 30-40.

Yeah, I never ran with that option enabled (it used to cause my testbox
to not boot, and I never got around to debugging why). I thought five seconds
was painful enough. I guess we have different thresholds for acceptable
behaviour here :-)

Could be one of the other debug options I had enabled exacerbates the
cleanup_net problem in a similar way though.

> There's maybe a case for cleanup_net() to release the mutex every now
> and again during cleanup, but I was also seeing a few other hung tasks
> unrelated to net_mutex when I disabled the unshare() system call in
> trinity, which makes me wonder if we need a more general solution.

Not sure. We may have to just look at these on a case by case basis.

Dave

\
 
 \ /
  Last update: 2016-07-21 15:41    [W:0.044 / U:0.820 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site