HomeFreeBSD

Don't import 0 into vmem quantum caches.

Description

Don't import 0 into vmem quantum caches.

vmem uses UMA cache zones to implement the quantum cache. Since
uma_zalloc() returns 0 (NULL) to signal an allocation failure, UMA
should not be used to cache resource 0. Fix this by ensuring that 0 is
never cached in UMA in the first place, and by modifying vmem_alloc()
to fall back to a search of the free lists if the cache is depleted,
rather than blocking in qc_import().

Reported by and discussed with: Brett Gutstein <bgutstein@rice.edu>
Reviewed by: alc
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D17483

Details

Provenance
markjAuthored on
Reviewer
alc
Differential Revision
D17483: Don't import 0 into the quantum cache.
Parents
rS339598: Fix style bugs in in6_pcblookup_lbgroup().
Branches
Unknown
Tags
Unknown