uma(9) provides a prototype for uma_zone_set_max , but doesn't mention what nitems, and (more importantly) doesn't mention the expected behavior for nitems, any bounds that should be checked/dealt with before passing them to the function, etc.
(In reply to yaneurabeya from comment #0) > uma(9) provides a prototype for uma_zone_set_max , but doesn't mention what mention what -> mention > nitems, and (more importantly) doesn't mention the expected behavior for > nitems, any bounds that should be checked/dealt with before passing them to > the function, etc.
From uma.h... * nitems The requested upper limit on the number of items allowed
The return value is important too... * Returns: * int The effective value of nitems after rounding up based on page size
As of today, UMA(9) has a paragraph describing nitems as the upper limit for items that can be allocated to a zone. There is no bounds checking for this value. I think this can be closed.
Fixed by https://cgit.freebsd.org/src/commit/?id=d794b3a3c23f671b6a8eca37255e6441522b6806