public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Makarenko <omakarenko@cyberplat.ru>
To: linux-kernel@vger.kernel.org
Cc: Andi Kleen <ak@suse.de>, jgarzik@mandrakesoft.com
Subject: Re: netif_wake_queue wrong was: [PATCH] NFS Server performance and  8139too
Date: Mon, 14 May 2001 15:40:23 +0400	[thread overview]
Message-ID: <3AFFC427.7FC1F5E@cyberplat.ru> (raw)
In-Reply-To: <3AFE3870.3BB1B69@cyberplat.ru> <20010513125329.B10250@gruyere.muc.suse.de>

[-- Attachment #1: Type: text/plain, Size: 1250 bytes --]

Andi Kleen wrote:
> 
> On Sun, May 13, 2001 at 11:32:00AM +0400, Oleg Makarenko wrote:
> > Beware that I am not a kernel hacker so the patch can be completely
> > wrong. But I hope it still can provide some useful information to
> > somebody  who really knows what is going on here :)
> 
> The problem is that the netif_wake_queue() 2.4 compatibility macro that
> was recently added to 2.2 was wrong. It should do a mark_bh(). 8139too
> uses the 2.4 macros, and therefore the netbh was always scheduled for too
> late and performance was bad.
> 
> This patch should fix all drivers that use the new framework.
> 

Unfortunately it doesn't. 8139too (and every other driver in 2.2.19 
source tree) uses its own version of netif_wake_queue(). So your patch
doesn't solve the problem with 8139too.

Here is another patch for 8139too that places mark_bh() into the 
netif_wake_queue() macro definition in 8139too.c. 

Or with you patch for kcomp.h is it now better to completely remove 
the macro redefinition from 8139too.c?

My first patch is more of reverse type as it places mark_bh() 
(that was lost) right after the netif_wake_queue() and 
calls mark_bh() more often than it wakes the queue in a manner 
of the older (working) 8139too version.

oleg

[-- Attachment #2: linux-2.2.19-8139too.patch --]
[-- Type: application/octet-stream, Size: 471 bytes --]

--- linux-2.2.20pre2/drivers/net/8139too.c	Mon May 14 11:16:30 2001
+++ linux-mole/drivers/net/8139too.c	Mon May 14 11:17:22 2001
@@ -187,7 +187,7 @@
 #endif
 
 #define dev_kfree_skb_irq(a)	dev_kfree_skb(a)
-#define netif_wake_queue(dev)	clear_bit(0, &dev->tbusy)
+#define netif_wake_queue(dev)	do { clear_bit(0, &dev->tbusy) ; mark_bh(NET_BH); } while(0)
 #define netif_stop_queue(dev)	set_bit(0, &dev->tbusy)
 
 static inline void netif_start_queue(struct device *dev)

      reply	other threads:[~2001-05-14  7:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-13  7:32 [PATCH] NFS Server performance and 8139too Oleg Makarenko
2001-05-13 10:53 ` netif_wake_queue wrong was " Andi Kleen
2001-05-14 11:40   ` Oleg Makarenko [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=3AFFC427.7FC1F5E@cyberplat.ru \
    --to=omakarenko@cyberplat.ru \
    --cc=ak@suse.de \
    --cc=jgarzik@mandrakesoft.com \
    --cc=linux-kernel@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