Limits on jumbo mbuf cluster allocation

Jack Vogel jfvogel at gmail.com
Fri Mar 8 20:13:29 UTC 2013


Yes, in the past the code was in this form, it should work fine Garrett,
just make sure
the 4K pool is large enough.

I've actually been thinking about making the ring mbuf allocation sparse,
and what type
of strategy could be used. Right now I'm thinking of implementing a tunable
threshold,
and as long as I'm doing that, the 82599 hardware has an interrupt that can
be set up
for a low descriptor condition. This could have some performance benefits,
I could decouple
the mbuf refresh even further from rxeof, relying on the interrupt to
initiate the refresh rather
than a count as it is now.

It needs some experimentation/testing first, but I will look into this.

Jack


On Fri, Mar 8, 2013 at 10:05 AM, Andre Oppermann <andre at freebsd.org> wrote:

> On 08.03.2013 18:04, Garrett Wollman wrote:
>
>> <<On Fri, 8 Mar 2013 00:31:18 -0800, Jack Vogel <jfvogel at gmail.com> said:
>>
>>  I am not strongly opposed to trying the 4k mbuf pool for all larger
>>> sizes,
>>> Garrett maybe if you would try that on your system and see if that helps
>>> you, I could envision making this a tunable at some point perhaps?
>>>
>>
>> If you can provide a patch I can certainly build it in to our kernel
>> and have it ready the next time the production server crashes.  I'd
>> like it to be at least a *little* tested by someone else beforehand,
>> though.
>>
>
> This should do the trick.
>
> --
> Andre
>
> Index: dev/ixgbe/ixgbe.c
> ==============================**==============================**=======
> --- dev/ixgbe/ixgbe.c   (revision 247893)
> +++ dev/ixgbe/ixgbe.c   (working copy)
> @@ -1120,12 +1120,8 @@
>         */
>         if (adapter->max_frame_size <= 2048)
>                 adapter->rx_mbuf_sz = MCLBYTES;
> -       else if (adapter->max_frame_size <= 4096)
> +       else
>                 adapter->rx_mbuf_sz = MJUMPAGESIZE;
> -       else if (adapter->max_frame_size <= 9216)
> -               adapter->rx_mbuf_sz = MJUM9BYTES;
> -       else
> -               adapter->rx_mbuf_sz = MJUM16BYTES;
>
>         /* Prepare receive descriptors and buffers */
>         if (ixgbe_setup_receive_**structures(adapter)) {
>


More information about the freebsd-net mailing list