netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Bart Van Assche <bvanassche@acm.org>
Cc: Neil Horman <nhorman@tuxdriver.com>,
	David Miller <davem@davemloft.net>,
	netdev@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH RFC] spinlock: split out debugging check from spin_lock_mutex
Date: Fri, 19 Apr 2013 10:38:02 +0200	[thread overview]
Message-ID: <20130419083802.GA27023@gmail.com> (raw)
In-Reply-To: <516813A0.1040300@acm.org>


* Bart Van Assche <bvanassche@acm.org> wrote:

> WARNING: at kernel/mutex.c:313 __mutex_unlock_slowpath+0x157/0x160()
> Pid: 181, comm: kworker/0:1H Tainted: G           O 3.9.0-rc6-debug+ #1
> Call Trace:
> <IRQ>  [<ffffffff8103c3ef>] warn_slowpath_common+0x7f/0xc0
> [<ffffffff8103c44a>] warn_slowpath_null+0x1a/0x20
> [<ffffffff81432047>] __mutex_unlock_slowpath+0x157/0x160
> [<ffffffff8143205e>] mutex_unlock+0xe/0x10
> [<ffffffff8136d031>] netpoll_poll_dev+0x111/0x9a0
> [<ffffffff81345f32>] ? __alloc_skb+0x82/0x2a0
> [<ffffffff8136dac5>] netpoll_send_skb_on_dev+0x205/0x3b0
> [<ffffffff8136e00a>] netpoll_send_udp+0x28a/0x3a0
> [<ffffffffa0524843>] ? write_msg+0x53/0x110 [netconsole]
> [<ffffffffa05248bf>] write_msg+0xcf/0x110 [netconsole]
> [<ffffffff8103d7f1>] call_console_drivers.constprop.16+0xa1/0x120
> [<ffffffff8103e848>] console_unlock+0x3f8/0x450
> [<ffffffff8103ecce>] vprintk_emit+0x1ee/0x510
> [<ffffffff812d1f2c>] dev_vprintk_emit+0x5c/0x70
> [<ffffffff810ff047>] ? mempool_free_slab+0x17/0x20

I *really* think that using a mutex from a low level debug interface like netpoll 
is a mistake. We want such interfaces to be as atomic and as self-contained as 
possible: using spinlocks, which could possibly be converted to raw spinlocks, 
etc.

mutexes should be used when there's an expectation of possibly long blocking time. 
That's not really the case for netpoll, we either are able to generate the skb 
right then and send it off, or we are in trouble, right?

Thanks,

	Ingo

  parent reply	other threads:[~2013-04-19  8:38 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-11 13:42 Netpoll triggers soft lockup Bart Van Assche
2013-04-11 14:08 ` Neil Horman
2013-04-11 15:18 ` [PATCH RFC] spinlock: split out debugging check from spin_lock_mutex Neil Horman
2013-04-11 15:54   ` Christoph Paasch
2013-04-11 17:04     ` Neil Horman
2013-04-11 17:51       ` Christoph Paasch
2013-04-11 15:57   ` Eric Dumazet
2013-04-11 16:56     ` Neil Horman
2013-04-11 17:31   ` Bart Van Assche
2013-04-11 17:52     ` Neil Horman
2013-04-11 19:14     ` Neil Horman
2013-04-12  6:27       ` Bart Van Assche
2013-04-12 11:32         ` Neil Horman
2013-04-12 14:01           ` Bart Van Assche
2013-04-12 18:45             ` Neil Horman
2013-04-13  7:35               ` Bart Van Assche
2013-04-13 12:03                 ` Neil Horman
2013-04-15 14:16                 ` Neil Horman
     [not found]                   ` <CAO+b5-oBfH3M0dnrQSs-p1BF_5hKy2tsU-dD=EP9+S=iqPs5ew@mail.gmail.com>
2013-04-16 17:24                     ` Neil Horman
2013-04-18 19:29                       ` Neil Horman
2013-04-22 20:12                         ` Neil Horman
     [not found]                           ` <CAO+b5-r5jVJNZWuREUH5MQ3baeSPR8fVV1p9pMnukmiZd9nRhg@mail.gmail.com>
2013-04-23 13:23                             ` Neil Horman
     [not found]                               ` <CAO+b5-rQPyO9QE9v+oQTeo+G-ftcsehSB5=63AZ13QW4EJ1X0Q@mail.gmail.com>
2013-04-23 13:44                                 ` Neil Horman
2013-04-23 17:33                                   ` David Miller
2013-04-23 17:50                                     ` Neil Horman
2013-04-27 18:53                                       ` bvba Bart Van Assche
2013-04-29 18:13                                         ` Neil Horman
2013-04-29 19:12                                           ` Bart Van Assche
2013-04-30 15:35                                           ` [PATCH RFC] netpoll: convert mutex into a semaphore Neil Horman
2013-05-01 19:00                                             ` David Miller
2013-05-01 19:34                                               ` Neil Horman
2013-04-19  8:38             ` Ingo Molnar [this message]
2013-04-19 12:52               ` [PATCH RFC] spinlock: split out debugging check from spin_lock_mutex Neil Horman
  -- strict thread matches above, loose matches on Subject: below --
2013-04-28  2:34 Neil Horman

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=20130419083802.GA27023@gmail.com \
    --to=mingo@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=bvanassche@acm.org \
    --cc=davem@davemloft.net \
    --cc=mingo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=tglx@linutronix.de \
    /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).