Re: kern/165903: mbuf leak

看板FB_stable作者時間12年前 (2013/04/27 13:33), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串10/10 (看更多)
On Wed, Apr 17, 2013 at 01:17:40PM -0700, Jeremy Chadwick wrote: > On Wed, Apr 17, 2013 at 05:38:12PM +0000, Chris Forgeron wrote: > > Hello, > > > > I'm happy to report that the patch from Gleb has fixed the problem. > > > > My system had 256 mbuf clusters in use at boot, and after a day, still only has 256 mbuf clusters in use. > > > > From the patch, I see we are now dropping these packets (?) - Was the issue that the packets were being queued up for further work, but nothing was being done with them? > > ... > > At line 538, a call to mtod() is performed, which is what allocates the > memory for the mbuf used for the ARP header. > > ... John Baldwin let me know that this isn't quite correct -- mtod() is actually just a macro which would turn this: 538 ah = mtod(m, struct arphdr *); Into this: 538 ah = (struct arphdr *)(m)->m_data; The actual mbuf allocation is done within the device driver (em(4) in this case), while the freeing of the mbuf is done within the network layer (if_ether.c in this case). I lazily chose to man mtod and found it was filed under MBUF(9) and made the assumption it did the allocation. The actual allocation itself looks to be MGET(9) and other friends. -- | Jeremy Chadwick jdc@koitsu.org | | UNIX Systems Administrator http://jdc.koitsu.org/ | | Mountain View, CA, US | | Making life hard for others since 1977. PGP 4BD6C0CB | _______________________________________________ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"
文章代碼(AID): #1HUsCUzS (FB_stable)
討論串 (同標題文章)
文章代碼(AID): #1HUsCUzS (FB_stable)