HomeFreeBSD

Check the UMA zone's full bucket cache before short-circuiting an alloc.

Description

Check the UMA zone's full bucket cache before short-circuiting an alloc.

The global "bucketdisable" flag indicates that we are in a low memory
situation and should avoid allocating buckets. However, in the
allocation path we were checking it before the full bucket cache and
bailing even if the cache is non-empty. Defer the check so that we have
a shot at allocating from the cache.

This came up because M_NOWAIT allocations from the buf trie node zone
must always succeed. In one scenario, all of the preallocated trie
nodes were in the bucket list, and a new slab allocation could not
succeed due to a memory shortage. The short-circuiting caused an
allocation failure which triggered a panic.

Reported by: pho
Reviewed by: cem
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D25980

Details

Provenance
markjAuthored on Aug 10 2020, 8:34 PM
Parents
rGcf8a49ab6e9d: Fix the following issues related to the TCP SYN-cache:
Branches
Unknown
Tags
Unknown

Event Timeline