Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144154468
D25950.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
890 B
Referenced Files
None
Subscribers
None
D25950.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D25950: buf_trie_alloc: Spin on alloc failure
Attached
Detach File
Event Timeline
Log In to Comment