From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Decotigny <decot@googlers.com>
Cc: Matt Carlson <mcarlson@broadcom.com>,
Michael Chan <mchan@broadcom.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Javier Martinez Canillas <martinez.javier@gmail.com>,
Robin Getz <rgetz@blackfin.uclinux.org>,
Matt Mackall <mpm@selenic.com>, Tom Herbert <therbert@google.com>
Subject: Re: [PATCH net-next v1 5/6] tg3: implementation of a non-NAPI mode
Date: Fri, 16 Dec 2011 20:50:42 +0100 [thread overview]
Message-ID: <1324065042.2621.27.camel@edumazet-laptop> (raw)
In-Reply-To: <6d55ce25f5f237a4538f6a2fcd2609b877669297.1324059527.git.decot@googlers.com>
Le vendredi 16 décembre 2011 à 10:19 -0800, David Decotigny a écrit :
> From: Tom Herbert <therbert@google.com>
>
> The tg3 NIC has a hard limit of 511 descriptors for the receive ring.
> Under heavy load of small packets, this device receive queue may not
> be serviced fast enough to prevent packets drops. This could be due
> to a variety of reasons such as lengthy processing delays of packets
> in the stack, softirqs being disabled too long, etc. If the driver is
> run in non-NAPI mode, the RX queue is serviced in the device
> interrupt, which is much less likely to be deferred for a substantial
> period of time.
>
> There are some effects in not using NAPI that need to be considered.
> It does increase the chance of live-lock in interrupt handler,
> although since the tg3 does interrupt coalescing this is very unlikely
> to occur. Also, more code is being run with interrupts disabled
> potentially deferring other hardware interrupts. The amount of time
> spent in the interrupt handler should be minimized by dequeuing
> packets of the device queue and queuing them to a host queue as
> quickly as possible.
>
> The default mode of operation remains NAPI and its performances are
> kept unchanged (code unchanged). Non-NAPI mode is enabled by
> commenting-out CONFIG_TIGON3_NAPI Kconfig parameter.
>
>
Oh well, thats ugly :(
I suspect this was only used with RPS/RFS ?
Or interrupts stick on a given cpu ?
Because with a default setup, and IRQ serviced by multiple cpus, you
endup with possible packet reorderings.
Packet1,2,3,4 handled by CPU0 : queued on netif_rx() queue.
EndOfInterrupt
Packet4,5,6,7 handled by CPU1 : queued on netif_rx() queue.
EndOfInterrupt
CPU0/CPU1 happily merge packets...
next prev parent reply other threads:[~2011-12-16 19:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-16 18:19 [PATCH net-next v1 0/6] tg3: adaptive interrupt coalescing, non-napi mode David Decotigny
2011-12-16 18:19 ` [PATCH net-next v1 1/6] tg3: fix possible infinite loop David Decotigny
2011-12-16 18:19 ` [PATCH net-next v1 2/6] tg3: Remove IRQF_SAMPLE_RANDOM flag from internal tests David Decotigny
2011-12-16 18:19 ` [PATCH net-next v1 3/6] tg3: Implement adaptive interrupt coalescing David Decotigny
2011-12-16 18:19 ` [PATCH net-next v1 4/6] tg3: move functions related to reset_task together David Decotigny
2011-12-16 18:19 ` [PATCH net-next v1 5/6] tg3: implementation of a non-NAPI mode David Decotigny
2011-12-16 19:30 ` Ben Hutchings
2011-12-16 19:42 ` Eric Dumazet
2011-12-16 19:50 ` Eric Dumazet [this message]
2011-12-16 18:19 ` [PATCH net-next v1 6/6] tg3: use netif_tx_start_queue instead of wake_queue when no reschedule needed David Decotigny
2011-12-16 18:42 ` [PATCH net-next v1 0/6] tg3: adaptive interrupt coalescing, non-napi mode David 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=1324065042.2621.27.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=decot@googlers.com \
--cc=linux-kernel@vger.kernel.org \
--cc=martinez.javier@gmail.com \
--cc=mcarlson@broadcom.com \
--cc=mchan@broadcom.com \
--cc=mpm@selenic.com \
--cc=netdev@vger.kernel.org \
--cc=rgetz@blackfin.uclinux.org \
--cc=therbert@google.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