netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maxim Uvarov <maxim.uvarov@oracle.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] bond_alb: do not disable BH under netpoll
Date: Wed, 04 Jan 2012 11:35:59 -0800	[thread overview]
Message-ID: <4F04AA1F.10004@oracle.com> (raw)
In-Reply-To: <20120104.132510.1521809723158602749.davem@davemloft.net>

On 01/04/2012 10:25 AM, David Miller wrote:
> From: Maxim Uvarov<maxim.uvarov@oracle.com>
> Date: Wed, 04 Jan 2012 00:14:39 -0800
>
>> On 03.01.2012 18:49, David Miller wrote:
>>> From: Maxim Uvarov<maxim.uvarov@oracle.com>
>>> Date: Tue,  3 Jan 2012 18:20:18 -0800
>>>
>>>> Do not disable BH if interrupts are already disabled
>>>> (netpoll case).
>>>> Signed-off-by: Maxim Uvarov<maxim.uvarov@oracle.com>
>>> Barf...
>>>
>>> We should never use conditional locking like this.
>>
>>
>> How about change spin_lock_bh  to spin_lock_irqsave at this place?
>
> Then it's ambiguous whether it's a softirq safe lock or a hardirq
> safe one.
>
> It's just another way to make the locking inconsistent.

at bond_start_xmit() there is check if it's netpoll or not:

	/*
	 * If we risk deadlock from transmitting this in the
	 * netpoll path, tell netpoll to queue the frame for later tx
	 */
	if (is_netpoll_tx_blocked(dev))
		return NETDEV_TX_BUSY;

which is in the end:

static inline int netpoll_tx_running(struct net_device *dev)
{
	return irqs_disabled();
}

So the original patch was in the way as it already implemented.

BTW,
I'm trying to remove warning generated by local_bh_enable_ip:
http://marc.info/?l=linux-netdev&m=132528368523980&w=2

Maxim.

      reply	other threads:[~2012-01-04 19:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-04  2:20 [PATCH] bond_alb: do not disable BH under netpoll Maxim Uvarov
2012-01-04  2:49 ` David Miller
2012-01-04  8:14   ` Maxim Uvarov
2012-01-04 18:25     ` David Miller
2012-01-04 19:35       ` Maxim Uvarov [this message]

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=4F04AA1F.10004@oracle.com \
    --to=maxim.uvarov@oracle.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /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).