linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Detlev Zundel <dzu@denx.de>
To: linuxppc-embedded@ozlabs.org
Subject: Re: how to improve linux tcp/ip(UDP) efficiency on mpc8541 833Mhz.
Date: Mon, 19 Nov 2007 16:10:40 +0100	[thread overview]
Message-ID: <m2ejems233.fsf@ohwell.denx.de> (raw)
In-Reply-To: 47407CCB.80503@chello.nl

Hi,

> We use a 8250 and 8270 of which the performance is highly limited by the 
> bandwidth of the memory to the very small internal cache.
> I once modified a driver into a "polling" method polling the device 
> every millisecond. The amount of messages processed trippled this way! 
> On full speed the console could even be used for "normal" operation (in 
> contrairy to the interrupt driver driver).
> The penalties are obvious: When the bandwith used is low the delay for 
> polled messages is higher and the CPU overhead is higher.

Just look at the NAPI[1] (New-NAPI in the latest incarnation) linux
layer for network drivers.  The upshot of this is that where "old"
drivers pull data from the network card onto the kernel network
backlog on interrupt time, NAPI drivers only set an internal flag so
they want to get polled by the kernel when it is ready and basically
disable further interrupts.  They are enabled again by the time the
driver was able to post all packets up to the network stack.

This effectively gives low latencies on low network load because it
more or less stays being interrupt driven but it turns into polling
mode on high network loads and thus prevents interrupt live lock
situations.  

Adapting the network driver in question to NNAPI should improve the
performance of the whole system quite a bit.

Best wishes
  Detlev

[1] http://www.linux-foundation.org/en/Net:NAPI

-- 
Indeed, the author firmly believes that the best serious work is also
good fun.   We needn't apologize if we enjoy doing research.
                                        -- Donald Knuth
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu@denx.de

      reply	other threads:[~2007-11-19 16:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-13  2:48 how to improve linux tcp/ip(UDP) efficiency on mpc8541 833Mhz huangyun
2007-11-13 11:32 ` Clemens Koller
2007-11-18 17:56   ` Theo Gjaltema
2007-11-19 15:10     ` Detlev Zundel [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=m2ejems233.fsf@ohwell.denx.de \
    --to=dzu@denx.de \
    --cc=linuxppc-embedded@ozlabs.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).