Use of contiguous physical memory in cxgbe driver

Scott Long scott4long at yahoo.com
Thu Feb 13 18:07:03 UTC 2014


On Feb 13, 2014, at 9:44 AM, Garrett Wollman <wollman at bimajority.org> wrote:

> <<On Wed, 12 Feb 2014 23:56:51 -0800, John-Mark Gurney <jmg at funkthat.com> said:
> 
>> Though we might want to keep a few mbufs reserved for receive now that
>> you mention it...  We should never get to the point where we can't
>> allocate even one frame for receive...
> 
> It's very easy to get to that state if the driver insists on getting
> three physically contiguous pages (which is what it takes to allocate
> a single 9k cluster)
> 

So what you’re saying is that all of the other memory allocations that go along with
moving data through a socket wind up fragmenting the free memory pool to the point
where it becomes impossible to find 3 contig pages for a 9k jumbo RX frame.

The old Tigon drivers used to solve this by having a private slab allocator for RX.
There was deliberate work more than 5 years ago to eliminate private allocators
like this and have a common jumbo allocator.  I think it’s possible to say that that
has been a theoretical success and a practical failure.

Scott




More information about the freebsd-net mailing list