Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Aug 2010 12:18:01 +0200
From:      Andre Oppermann <andre@freebsd.org>
To:        adrian.chadd@gmail.com
Cc:        pyunyh@gmail.com, freebsd-net@freebsd.org
Subject:   Re: 8.0-RELEASE-p3: 4k jumbo mbuf cluster exhaustion
Message-ID:  <4C724AD9.5020000@freebsd.org>
In-Reply-To: <AANLkTi=t%2BnG8isp1nf2aBec%2BFwomApNt0NBPO8LqZ%2B=9@mail.gmail.com>
References:  <AANLkTikrbCFHz-CnuYcgH2JzpeH5hob0Aa2y5dwn3Hvv@mail.gmail.com>	<AANLkTikYMU=wML_z=HDnkUF1PGYMVa1q-QWTrkxD%2B7EP@mail.gmail.com>	<20100822222746.GC6013@michelle.cdnetworks.com> <AANLkTi=t%2BnG8isp1nf2aBec%2BFwomApNt0NBPO8LqZ%2B=9@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 23.08.2010 11:26, Adrian Chadd wrote:
> On 23 August 2010 06:27, Pyun YongHyeon<pyunyh@gmail.com>  wrote:
>
>> I recall there was SIOCSIFCAP ioctl handling bug in bce(4) on 8.0 so
>> it might also disable IFCAP_TSO4/IFCAP_TXCSUM/IFCAP_RXCSUM when yo
>> disabled RX checksum offloading. But I can't explain how checksum
>> offloading could be related with the growth of 4k jumbo buffers.
>
> Neither can I!
>
> I'm trying to come up with a reproduction method that doesn't involve
> "put box on the internet, push clients through it, wait."

Network drivers use 2k sized mbuf clusters on receive.  So the problem
doesn't seem to be RX related.

The function that is called on a socket write is sosend_generic() which
makes use of m_getm2().  This function allocates mbuf chains with the
tightest packing it can achieve.  It will make use 4k (page size) mbufs
as much as it can.  This is where they come from.

It seems the 4k clusters do not get freed back to the pool after they've
been sent by the NIC and dropped from the socket buffer after the ACK has
arrived.  The leak must occur in one of these two places.  The socket
buffer is unlikely as it would affect not just you but everyone else too.
Thus the mbuf freeing after DMA/tx in the bce(4) driver is the prime suspect.

-- 
Andre



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C724AD9.5020000>