All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@codemonkey.org.uk>
To: Vegard Nossum <vegard.nossum@oracle.com>
Cc: trinity@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>,
	Tejun Heo <tj@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Russell King <rmk+kernel@arm.linux.org.uk>
Subject: Re: cleanup_net()/net_mutex hung tasks + kobject release debugging
Date: Thu, 21 Jul 2016 09:13:46 -0400	[thread overview]
Message-ID: <20160721131346.GA1705@codemonkey.org.uk> (raw)
In-Reply-To: <5790C376.2010206@oracle.com>

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

  reply	other threads:[~2016-07-21 13:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-21 12:43 cleanup_net()/net_mutex hung tasks + kobject release debugging Vegard Nossum
2016-07-21 13:13 ` Dave Jones [this message]
2016-07-30 12:58   ` Eric W. Biederman

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=20160721131346.GA1705@codemonkey.org.uk \
    --to=davej@codemonkey.org.uk \
    --cc=bhelgaas@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+kernel@arm.linux.org.uk \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.org \
    --cc=trinity@vger.kernel.org \
    --cc=vegard.nossum@oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.