cvs commit: src/sys/vm uma_core.c

Bosko Milekic bmilekic at FreeBSD.org
Wed Jun 9 19:29:18 GMT 2004


Please note: this only fixes the cluster case and not other types
of ext bufs which do MEXTADD.  Basically the refcounting method
works well as long as the refcounts are type-stable.  This could
be made a requirement for all ext_bufs without problem, and for
those who do not provide ref cnts, I will replace the malloc() of
the refcnt with a uma zone allocation of the refcnt from a special
UMA_ZONE_NOFREE refcnt zone.

We need to use atomics here because there is no place where to put
a mutex, so I can't fix this by just protecting the refcnt with
a mutex.

-Bosko

bmilekic    2004-06-09 19:18:51 UTC

  FreeBSD src repository

  Modified files:
    sys/vm               uma_core.c
  Log:
  Make the slabrefzone, the zone from which we allocated slabs with
  internal reference counters, UMA_ZONE_NOFREE.  This way, those slabs
  (with their ref counts) will be effectively type-stable, then using
  a trick like this on the refcount is no longer dangerous:

...



More information about the cvs-src mailing list