Index: sys/kern/vfs_subr.c =================================================================== --- sys/kern/vfs_subr.c +++ sys/kern/vfs_subr.c @@ -492,7 +492,16 @@ static void * buf_trie_alloc(struct pctrie *ptree) { - return (uma_zalloc_smr(buf_trie_zone, M_NOWAIT)); + void *res; + + /* Spin to accommodate potential SMR free latency. */ + for (;;) { + res = uma_zalloc_smr(buf_trie_zone, M_NOWAIT); + if (__predict_true(res != NULL)) + break; + smr_synchronize(buf_trie_smr); + } + return (res); } static void @@ -677,7 +686,8 @@ NULL, NULL, pctrie_zone_init, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE | UMA_ZONE_SMR); buf_trie_smr = uma_zone_get_smr(buf_trie_zone); - uma_prealloc(buf_trie_zone, nbuf); + /* XXX: slop */ + uma_prealloc(buf_trie_zone, nbuf * 3 / 2); vnodes_created = counter_u64_alloc(M_WAITOK); recycles_count = counter_u64_alloc(M_WAITOK);