Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F140025145
D50389.id155604.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
924 B
Referenced Files
None
Subscribers
None
D50389.id155604.diff
View Options
Index: sys/kern/subr_pctrie.c
===================================================================
--- sys/kern/subr_pctrie.c
+++ sys/kern/subr_pctrie.c
@@ -630,16 +630,24 @@
base = (index + i) % PCTRIE_COUNT;
if (base == 0 || parent == NULL || parent->pn_clev != 0)
continue;
- end = MIN(count, i + PCTRIE_COUNT - base);
+ end = (access == PCTRIE_SMR) ? PCTRIE_COUNT - base :
+ ffs((parent->pn_popmap >> base) + 1) - 1;
+ end = MIN(count, i + end);
while (i < end) {
node = pctrie_node_load(&parent->pn_child[base++],
smr, access);
- if ((val = pctrie_toval(node)) == NULL)
+ val = pctrie_toval(node);
+ if (access == PCTRIE_SMR && val == NULL)
break;
value[i++] = val;
}
- if (i < end)
- break;
+ if (access == PCTRIE_SMR) {
+ if (i < end)
+ break;
+ } else {
+ if (base < PCTRIE_COUNT)
+ break;
+ }
}
if (parent_out != NULL)
*parent_out = parent;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 20, 5:14 AM (9 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27092330
Default Alt Text
D50389.id155604.diff (924 B)
Attached To
Mode
D50389: pctrie: use popmap in locked lookup_range
Attached
Detach File
Event Timeline
Log In to Comment