mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: herbert@gondor.apana.org.au
Cc: akpm@osdl.org, mingo@elte.hu, alan@lxorguk.ukuu.org.uk,
	lenb@kernel.org, linux-kernel@vger.kernel.org, ak@suse.de,
	torvalds@osdl.org
Subject: Re: [patch] net: dev_watchdog() locking fix
Date: Sat, 09 Dec 2006 14:02:05 -0800 (PST)	[thread overview]
Message-ID: <20061209.140205.126778911.davem@davemloft.net> (raw)
In-Reply-To: <20061208235952.GA4693@gondor.apana.org.au>

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Sat, 9 Dec 2006 10:59:52 +1100

> On Fri, Dec 08, 2006 at 03:19:02PM -0800, Andrew Morton wrote:
> > 
> > Like this?
> > 
> > 	/* don't get messages out of order, and no recursion */
> > 	if (skb_queue_len(&npinfo->txq) == 0 &&
> > 		    npinfo->poll_owner != smp_processor_id()) {
> > 		local_bh_disable();	/* Where's netif_tx_trylock_bh()? */
> > 		if (netif_tx_trylock(dev)) {
> > 			/* try until next clock tick */
> > 			for (tries = jiffies_to_usecs(1)/USEC_PER_POLL;
> > 					tries > 0; --tries) {
> > 				if (!netif_queue_stopped(dev))
> > 					status = dev->hard_start_xmit(skb, dev);
> > 
> > 				if (status == NETDEV_TX_OK)
> > 					break;
> > 
> > 				/* tickle device maybe there is some cleanup */
> > 				netpoll_poll(np);
> > 
> > 				udelay(USEC_PER_POLL);
> > 			}
> > 			netif_tx_unlock(dev);
> > 		}
> > 		local_bh_enable();
> > 	}
> 
> Looks good to me.  Thanks Andrew!

I've applied this patch, thanks a lot.

  reply	other threads:[~2006-12-09 22:02 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-06 22:30 [patch] ACPI, i686, x86_64: fix laptop bootup hang in init_acpi() Ingo Molnar
2006-12-06 23:57 ` Len Brown
2006-12-07 11:08   ` Ingo Molnar
2006-12-07 12:11   ` [patch] x86_64: do not enable the NMI watchdog by default Ingo Molnar
2006-12-07 12:30     ` Alan
2006-12-07 20:38       ` Andrew Morton
2006-12-07 20:47         ` Ingo Molnar
2006-12-07 20:49           ` Ingo Molnar
2006-12-07 20:55             ` [patch] net: dev_watchdog() locking fix Ingo Molnar
2006-12-07 21:06               ` Herbert Xu
2006-12-08 23:19                 ` Andrew Morton
2006-12-08 23:59                   ` Herbert Xu
2006-12-09 22:02                     ` David Miller [this message]
2006-12-11  7:45                       ` Andrew Morton
2006-12-11  7:51                         ` Herbert Xu
2006-12-11  7:56                           ` Ingo Molnar
2006-12-11 20:09                           ` Andrew Morton
2006-12-07 17:24     ` [patch] x86_64: do not enable the NMI watchdog by default Andi Kleen
2006-12-07  2:28 ` [patch] ACPI, i686, x86_64: fix laptop bootup hang in init_acpi() Sergio Monteiro Basto
2006-12-07  4:47   ` Karsten Wiese
2006-12-07 11:09     ` Ingo Molnar
2006-12-07 11:24       ` Ingo Molnar

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=20061209.140205.126778911.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=herbert@gondor.apana.org.au \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=torvalds@osdl.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

Powered by JetHome