UMA questions

Bosko Milekic bmilekic at
Wed Aug 11 08:29:51 PDT 2004

>1. UMA zones do not show up in the output of 'vmstat -m'.  Is there a way
>   to get information on how much memory each UMA zone is using?
>   Example: "sackhole", "tcptw", ...

   vmstat -z, or sysctl  Be careful when interpreting the stats
   in the Mbuf, Mbuf Cluster, and Packet zones, because they are special.
   See if you want to
   know why, exactly.

>2. What does the flag UMA_ZONE_ZINIT do exactly?

   It initializes zone-allocated objects to zero.  This happens as objects
   are first allocated (i.e., slabs are allocated) and before placement
   into the slab cache.  Unfortunately, I am not sure this works very well
   unless you also make sure to zero them as they are returned (dtor),
   which is a shitty model.

>3. What does the flag UMA_ZONE_NOFREE prevent exactly?  Will it prevent any
>   zone/slab of this type to be free'd ever again?  This way the zone can
>   only grow and not shrink after transient peaks?

   Yes.  It prevents freeing/draining of the slab cache.


More information about the freebsd-current mailing list