[PATCH 2/6] sfxge: limit software Tx queue size
Andrew Rybchenko
Andrew.Rybchenko at oktetlabs.ru
Sat Mar 22 10:16:34 UTC 2014
Gleb,
On 03/18/2014 05:24 PM, Gleb Smirnoff wrote:
> Andrew,
>
> On Tue, Mar 18, 2014 at 01:55:01PM +0400, Andrew Rybchenko wrote:
> A> sfxge: limit software Tx queue size
> A>
> A> Previous implementation limits put queue size only (when Tx lock can't
> A> be acquired),
> A> but get queue may grow unboundedly which results in mbuf pools
> A> exhaustion and
> A> latency growth.
> A>
> A> Submitted-by: Andrew Rybchenko <Andrew.Rybchenko at oktetlabs.ru>
> A> Sponsored by: Solarflare Communications, Inc.
>
> The interaction between sfxge_tx_qdpl_put() and sfxge_tx_packet_add()
> is quite complex and I couldn't resist from suggesting you to
> simplify the code.
>
> Can you please look into attached patch?
>
> - Inline sfxge_tx_qdpl_put() into sfxge_tx_packet_add().
> - Simplify the 'locked' logic.
> - Add your PATCH 1/6, the mbuf leak fix.
> - Add your PATCH 2/6, the SFXGE_TX_DPL_GET_PKT_LIMIT_DEFAULT check.
I don't like "locked" flag passed to qdpl_put() function as well.
However, I prefer to keep patches granular and avoid mixing of different
changes in single patch. If the initial patch is OK, please, submit it
to repository. Then, I'll rebase your patch, discuss it locally and come
back to you.
BTW, I see that many drivers use drbr for software Tx queue. What do you
think, would it be beneficial to use it instead of the list implemented
here?
Please, find initial patch with few minor fixes (TAB after #define and
@->" at " in suggested commit message) attached.
Thanks a lot,
Andrew.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2-sfxge-limit.patch
Type: text/x-patch
Size: 1790 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-net/attachments/20140322/50f74cb0/attachment.bin>
More information about the freebsd-net
mailing list