Page MenuHomeFreeBSD

D25950.diff
No OneTemporary

D25950.diff

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);

File Metadata

Mime Type
text/plain
Expires
Fri, Feb 6, 3:47 PM (16 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28448996
Default Alt Text
D25950.diff (890 B)

Event Timeline