SMP problem with uma_zalloc

Bosko Milekic bmilekic at
Sat Jul 19 13:59:53 PDT 2003

On Sat, Jul 19, 2003 at 08:31:26PM +0200, Lara & Harti Brandt wrote:
> Well the problem is, that nothing is starved. I have an idle machine and
> a zone that I have limited to 60 or so items. When allocating the 2nd
> item I get block on the zone limit. Usually I get unblocked whenever I
> free an item. This will however not happen, because I have neither
> reached the limit nor is there memory pressure in the system to which I
> could react. I simply may be blocked forever.

  UMA_ZFLAG_FULL is set on the zone prior to the msleep().  This means
  that the next free will result in your wakeup, as the next free will
  be sent to the zone internally, and not the pcpu cache.

> That makes the limit feature for zones rather useless, because I cannot 
> predict how many of the items I can really allocate (this depends on the 
> number of processors, the page size and the configuration of UMA itself).
> Perhaps we could make the behaviour dependent on the maximum number of 
> items. When it is rather low (a couple of pages worth) and I would block 
> on the zone limit and I have free items in another CPU's cache then 
> drain one of the caches.
> Or I could simply remove the limits.
> harti

Bosko Milekic  *  bmilekic at  *  bmilekic at
TECHNOkRATIS Consulting Services  *

More information about the freebsd-current mailing list