Subject: Re: NMBCLUSTERS again
To: None <>
From: Darren Reed <>
List: tech-net
Date: 10/29/2007 00:44:16 wrote:
> hello,
> I applied the patch but it does not help. The used mbufs are still
> increasing.

Ok.  At this point I think we need to be able to get at more
information about mbufs in order to debug the problem further.

What I'd like to suggest is that we add "char *mh_file" and
"int mh_line" to "m_hdr" if DEBUG is defined and assign the
values of __FILE__ and __LINE__ to these fields in MGET and
MGETHDR if DEBUG is defined. Or even replace both of those
fields with a "char *mh_allocstack" that shows the kernel's
call stack.

But to make that workable, we need to change the pool cache
slightly - the pool_cache_group needs to carry an array of
pointers to objects that have been alloc'd, not just those
that are available to be allocated.  A pcg_inuse[] that is
the inverse of pcg_objects[].  Then you can walk pcg_inuse[]
for mbufs and at least see who allocated the mbufs in question.