netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andi Kleen <ak@muc.de>
To: "David S. Miller" <davem@redhat.com>
Cc: kuznet@ms2.inr.ac.ru, netdev@oss.sgi.com, akepner@sgi.com
Subject: Re: [PATCH] Extend lock less TX to real devices
Date: 4 Sep 2004 15:28:09 +0200
Date: Sat, 4 Sep 2004 15:28:09 +0200	[thread overview]
Message-ID: <20040904132809.GB33964@muc.de> (raw)
In-Reply-To: <20040901223301.1a8d97a8.davem@redhat.com>

On Wed, Sep 01, 2004 at 10:33:01PM -0700, David S. Miller wrote:
> On Tue, 31 Aug 2004 14:38:20 +0200
> Andi Kleen <ak@muc.de> wrote:
> 
> > This patch extends the recently added NETIF_F_LLTX to real devices.
> 
> Well, it does a lot of other things too.

Not really, it all works to the same goal.

> 
> > I added support for trylocking instead of spinning like sch_generic
> > does - for that the driver has to return -1, then the packet is requeued.
> > The check for a local device deadlock is lost for this case, 
> > but that doesn't seem to be a big loss (I've never seen this printk 
> > ever get triggered)
> 
> It is triggerable if you misconfigure your system.

Really? The only reason I can see for it is a buggy driver.

> I'm totally against this change, because previously at

There is no change, except for drivers that set LLTX
and these get different semantics anyways because they
have to handle this on their own.  In case the driver
has bugs I guess it would be better to add the printk
directly below the try_lock in the LLTX driver.

> least the user would find out in their logs.  With your
> change the system explodes looping with no explanation why.

Hmm, I guess if you're really worried about this class
of driver bugs being common adding some real error handling
for it (like bailing out and disabling the device) would
be the far better option.

> 
> > The patch looks bigger than it really is because i moved some code
> > around and converted the macros into inlines. 
>  ..
> > I also did an additional micro optimization:
> 
> And for this reason you need to split this patch up.
> I would recommend:
> 
> patch 1) Change macros into inlines
> patch 2) local_bh_disable() preemption count optimization
> patch 3) support for F_LLTX on real devices
> patch 4) locking changes

At least (3) and (4) are the same thing. I can drop the 
inlines, it was only for making the code clearer and less ugly
but is not essential for the optimizations.

-Andi

  reply	other threads:[~2004-09-04 13:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-31 12:38 [PATCH] Extend lock less TX to real devices Andi Kleen
2004-09-02  5:33 ` David S. Miller
2004-09-04 13:28   ` Andi Kleen [this message]
2004-09-04 14:11     ` jamal
2004-09-04 14:24       ` Andi Kleen
2004-09-04 19:39     ` Herbert Xu

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=20040904132809.GB33964@muc.de \
    --to=ak@muc.de \
    --cc=akepner@sgi.com \
    --cc=davem@redhat.com \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=netdev@oss.sgi.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 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).