Re: about MINCLSIZE
Re: about MINCLSIZE
- Subject: Re: about MINCLSIZE
- From: Josh Graessley <email@hidden>
- Date: Thu, 9 Jun 2005 12:33:39 -0700
On Tiger, you should get these values from mbuf_stat. We would like
the flexibility to change these values in the future. Getting the
value from mbuf_stat instead of using the constant will go a long
ways towards achieving that. The constants are no longer available
starting in Tiger.
-josh
On Jun 9, 2005, at 12:02 PM, Andrew Gallatin wrote:
chas williams - CONTRACTOR writes:
is this definition for MINCLSIZE right?
from sys/mbuf.h:
/*
* Mbufs are of a single size, MSIZE (machine/param.h), which
* includes overhead. An mbuf may add a single "mbuf cluster"
of size
* MCLBYTES (also in machine/param.h), which has no additional
overhead
* and is used instead of the internal data area; this is done
when
* at least MINCLSIZE of data must be stored.
*/
#define MLEN (MSIZE - sizeof(struct m_hdr)) /*
normal data len */
#define MHLEN (MLEN - sizeof(struct pkthdr)) /*
data len w/pkthdr */
#define MINCLSIZE (MHLEN + MLEN) /* smallest amount to
put in cluster */
based on the usage (and description) of MINCLSIZE i would guess it
should
be closer to MHLEN + 1. MHLEN + MLEN is essentially 2 * MSIZE which
will not fit inside a single mbuf?
Mbufs may also be chained. You can easily encounter an mbuf chain of
multiple mbufs of any type.
For MINCLSIZE, I think the rationale is that it is cheaper, and wastes
less space to allocate another mbuf and chain them than it does to
allocate a cluster.
Drew
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40apple.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden