Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F133618894
D15184.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D15184.diff
View Options
Index: head/sys/vm/uma.h
===================================================================
--- head/sys/vm/uma.h
+++ head/sys/vm/uma.h
@@ -265,8 +265,8 @@
* information in the vm_page.
*/
#define UMA_ZONE_SECONDARY 0x0200 /* Zone is a Secondary Zone */
-/* 0x0400 Unused */
-#define UMA_ZONE_MAXBUCKET 0x0800 /* Use largest buckets */
+#define UMA_ZONE_NOBUCKET 0x0400 /* Do not use buckets. */
+#define UMA_ZONE_MAXBUCKET 0x0800 /* Use largest buckets. */
#define UMA_ZONE_CACHESPREAD 0x1000 /*
* Spread memory start locations across
* all possible cache lines. May
Index: head/sys/vm/uma_core.c
===================================================================
--- head/sys/vm/uma_core.c
+++ head/sys/vm/uma_core.c
@@ -1681,10 +1681,15 @@
}
out:
- if ((arg->flags & UMA_ZONE_MAXBUCKET) == 0)
- zone->uz_count = bucket_select(zone->uz_size);
- else
+ KASSERT((arg->flags & (UMA_ZONE_MAXBUCKET | UMA_ZONE_NOBUCKET)) !=
+ (UMA_ZONE_MAXBUCKET | UMA_ZONE_NOBUCKET),
+ ("Invalid zone flag combination"));
+ if ((arg->flags & UMA_ZONE_MAXBUCKET) != 0)
zone->uz_count = BUCKET_MAX;
+ else if ((arg->flags & UMA_ZONE_NOBUCKET) != 0)
+ zone->uz_count = 0;
+ else
+ zone->uz_count = bucket_select(zone->uz_size);
zone->uz_count_min = zone->uz_count;
return (0);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Oct 28, 1:47 AM (10 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
24329697
Default Alt Text
D15184.diff (1 KB)
Attached To
Mode
D15184: Add a UMA zone flag to disable the use of buckets
Attached
Detach File
Event Timeline
Log In to Comment