[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20091026.152830.75929619.davem@davemloft.net>
Date: Mon, 26 Oct 2009 15:28:30 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: vladz@...adcom.com
Cc: eilong@...adcom.com, netdev@...r.kernel.org
Subject: Re: [PATCH net-next] bnx2x: Do Tx handling in a separate tasklet.
From: "Vladislav Zolotarov" <vladz@...adcom.com>
Date: Mon, 26 Oct 2009 07:42:27 -0700
> The separation of Tx and Rx interrupt handling gives us the
> possibility to properly affinitize the Rx (heavy CPU consuming task)
> and Tx (low CPU consuming task) and to ensure that Tx work is done
> not long after the Tx interrupt without interference of Rx work thus
> letting the user benefit from Tx coalescing configuration in order
> to achieve the best performance in each specific scenario. This is
> most important in heavy load scenarios with mixed traffic (UDP + TCP
> for instance). If we didn't separate Tx and Rx interrupt handling Tx
> coalescing configuration was not worth much.
There are other issues:
1) Actually, it makes sense to do TX and RX work together, since TX
packet liberation makes fresh CPU local packets available for
responses generated by RX packet reception.
2) TX packet liberation is not low CPU consumption, it has to perform
many atomic instructions, reference socket state, enter the SLAB
allocator, potentially liberate netfilter state, etc.
Using NAPI also moves the TX freeing into softirq context.
If you do it from a hardirq you are making it more expensive. From
hardirq the free just puts the SKB on a list, schedules a softirq,
then does the real SKB free work from the softirq.
This needless SKB list management and softirq scheduling you'll
avoid if you do things from softirqs, and thus using NAPI makes
sense here.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists