Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Mar 2013 12:13:28 -0800
From:      Jack Vogel <jfvogel@gmail.com>
To:        Andre Oppermann <andre@freebsd.org>
Cc:        freebsd-net@freebsd.org, Garrett Wollman <wollman@freebsd.org>
Subject:   Re: Limits on jumbo mbuf cluster allocation
Message-ID:  <CAFOYbc=7iROKzUwnB0fMR=ix8VFo%2BONfG=NX43jeF7jkp74JhQ@mail.gmail.com>
In-Reply-To: <513A2887.2010408@freebsd.org>
References:  <20793.36593.774795.720959@hergotha.csail.mit.edu> <51399926.6020201@freebsd.org> <CAFOYbc=x7U-s70KvcZJdrVP6v-On716qMi=HN1P2Kj%2Bd_K972A@mail.gmail.com> <20794.6692.191898.682241@hergotha.csail.mit.edu> <513A2887.2010408@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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@freebsd.org> wrote:

> On 08.03.2013 18:04, Garrett Wollman wrote:
>
>> <<On Fri, 8 Mar 2013 00:31:18 -0800, Jack Vogel <jfvogel@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)) {
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFOYbc=7iROKzUwnB0fMR=ix8VFo%2BONfG=NX43jeF7jkp74JhQ>