netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: Francois Romieu <romieu@fr.zoreil.com>
Cc: shemminger@osdl.org, hadi@cyberus.ca, iod00d@hp.com,
	eric.lemoine@gmail.com, roland@topspin.com, netdev@oss.sgi.com,
	ak@suse.de, openib-general@openib.org, kaber@trash.net
Subject: Re: [openib-general] Re: LLTX and netif_stop_queue
Date: Wed, 19 Jan 2005 16:52:47 -0800	[thread overview]
Message-ID: <20050119165247.5d4cec51.davem@davemloft.net> (raw)
In-Reply-To: <20050120004753.GB2330@electric-eye.fr.zoreil.com>

On Thu, 20 Jan 2005 01:47:53 +0100
Francois Romieu <romieu@fr.zoreil.com> wrote:

> David S. Miller <davem@davemloft.net> :
> [...]
> > Originally, dev->xmit_lock was added so that drivers that were SMP dumb
> > could stay that way.  Thus preserving the guarentee that there would be
> > only one active call into the dev->hard_start_xmit method across the
> > entire system.  I don't think any of that is relevant any longer.  All
> > of our network drivers are pretty clean in this regard.
> 
> (nit)
> 
> Almost all. I used the fact that dev->hard_start_xmit was issued in
> a bh disabled context to exchange spinlock_irqsave for ordered ops
> on ring indexes so as to sync hard_start_xmit and the irq handler in
> the r8169 driver. It is a bit sick but Jon Mason reported it made a
> noticeable difference to avoid the irqsave on its 4 way ppc64 and 
> nobody complained about it.

Hmmm... ok then.  Unfortunately, my prototype patch I just posted
will make IRQs get disabled in the ->hard_start_xmit() path.

BTW, in your close() routine you do this:

	/* Give a racing hard_start_xmit a few cycles to complete. */
	set_current_state(TASK_UNINTERRUPTIBLE);
	schedule_timeout(1);

This is no guarentee of progress.  You might instead want to
do a synchronize_kernel() or similar, which does in fact
guarentee a quiescent state.

Or if my patch goes in use spin_unlock_wait(&netdev->xmit_lock) ;-)

  reply	other threads:[~2005-01-20  0:52 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-17 21:57 LLTX and netif_stop_queue Roland Dreier
2004-12-18  5:44 ` David S. Miller
2004-12-18 15:35   ` Roland Dreier
2004-12-18 17:58     ` Roland Dreier
2004-12-18 18:26       ` Roland Dreier
2004-12-19 19:33     ` jamal
2004-12-19 19:31   ` jamal
2004-12-19 19:54     ` jamal
2004-12-19 20:02       ` Jamal Hadi Salim
2004-12-19 22:35     ` Roland Dreier
2004-12-19 23:06       ` jamal
2004-12-19 23:16         ` Roland Dreier
2004-12-22 18:49     ` Eric Lemoine
2004-12-23  4:29       ` David S. Miller
2004-12-23  4:38         ` Roland Dreier
2004-12-23  9:10         ` Eric Lemoine
2004-12-23 16:37           ` Patrick McHardy
2004-12-23 18:11             ` Eric Lemoine
2004-12-24 16:10             ` Eric Lemoine
2004-12-28 13:31               ` jamal
2005-01-02 23:30                 ` Eric Lemoine
2005-01-03  7:41                   ` Eric Lemoine
2005-01-03 15:04                   ` jamal
2005-01-03 15:48                     ` Eric Lemoine
2005-01-03 15:57                     ` Roland Dreier
2005-01-03 16:41                       ` Eric Lemoine
2005-01-03 16:54                         ` Roland Dreier
2005-01-03 17:07                           ` Eric Lemoine
2005-01-03 17:12                             ` Grant Grundler
2005-01-04  4:18                               ` jamal
2005-01-19 22:47                                 ` David S. Miller
2005-01-19 23:18                                   ` Stephen Hemminger
2005-01-19 23:41                                     ` David S. Miller
2005-01-20  0:02                                       ` [openib-general] " Jeff Garzik
2005-01-20  0:46                                         ` Stephen Hemminger
2005-01-20  0:47                                           ` David S. Miller
2005-01-20  0:47                                       ` Francois Romieu
2005-01-20  0:52                                         ` David S. Miller [this message]
2005-01-20  1:17                                           ` Francois Romieu
2005-01-20  0:46                                     ` [PATCH]: was " David S. Miller
2005-01-20  3:14                                       ` Andi Kleen
2005-01-20  7:05                                         ` David S. Miller
2005-01-20  3:43                                       ` Roland Dreier
2005-01-20  7:05                                         ` David S. Miller
2005-01-20 13:51                                           ` Tommy Christensen
2005-01-20 21:34                                             ` David S. Miller
2005-01-20 21:56                                               ` Grant Grundler
2005-01-21  1:01                                                 ` David S. Miller
2005-01-22  3:17                                                   ` Roland Dreier
2005-01-22  3:53                                                     ` David S. Miller
2005-01-20 21:41                                             ` David S. Miller
2005-01-20 16:56                                           ` Stephen Hemminger
2005-01-21 10:54                                             ` Lennert Buytenhek
2005-01-26  6:27                                               ` David S. Miller
2005-01-26 13:25                                                 ` Lennert Buytenhek
2005-01-27  6:32                                                   ` David S. Miller
2005-01-27  7:16                                                     ` Andi Kleen
2005-01-27  7:22                                                       ` David S. Miller
2005-01-27  8:26                                                         ` Andi Kleen
2005-01-20 19:16                                           ` Jeff Garzik
2005-01-20  4:01                                       ` jamal
2005-01-20  5:18                                         ` David S. Miller

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=20050119165247.5d4cec51.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=ak@suse.de \
    --cc=eric.lemoine@gmail.com \
    --cc=hadi@cyberus.ca \
    --cc=iod00d@hp.com \
    --cc=kaber@trash.net \
    --cc=netdev@oss.sgi.com \
    --cc=openib-general@openib.org \
    --cc=roland@topspin.com \
    --cc=romieu@fr.zoreil.com \
    --cc=shemminger@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;
as well as URLs for NNTP newsgroup(s).