Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151372390
D20930.id.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
D20930.id.diff
View Options
Index: head/sys/vm/uma.h
===================================================================
--- head/sys/vm/uma.h
+++ head/sys/vm/uma.h
@@ -274,6 +274,7 @@
* NUMA aware Zone. Implements a best
* effort first-touch policy.
*/
+#define UMA_ZONE_MINBUCKET 0x20000 /* Use smallest buckets. */
/*
* These flags are shared between the keg and zone. In zones wishing to add
Index: head/sys/vm/uma_core.c
===================================================================
--- head/sys/vm/uma_core.c
+++ head/sys/vm/uma_core.c
@@ -209,6 +209,7 @@
(((sizeof(void *) * (n)) - sizeof(struct uma_bucket)) / sizeof(void *))
#define BUCKET_MAX BUCKET_SIZE(256)
+#define BUCKET_MIN BUCKET_SIZE(4)
struct uma_bucket_zone bucket_zones[] = {
{ NULL, "4 Bucket", BUCKET_SIZE(4), 4096 },
@@ -1867,9 +1868,12 @@
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)
+ if ((arg->flags & UMA_ZONE_MAXBUCKET) != 0) {
zone->uz_count = BUCKET_MAX;
- else if ((arg->flags & UMA_ZONE_NOBUCKET) != 0)
+ } else if ((arg->flags & UMA_ZONE_MINBUCKET) != 0) {
+ zone->uz_count = BUCKET_MIN;
+ zone->uz_count_max = BUCKET_MIN;
+ } else if ((arg->flags & UMA_ZONE_NOBUCKET) != 0)
zone->uz_count = 0;
else
zone->uz_count = bucket_select(zone->uz_size);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 8, 11:12 PM (12 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31121017
Default Alt Text
D20930.id.diff (1 KB)
Attached To
Mode
D20930: Add support for a MINBUCKET zone flag.
Attached
Detach File
Event Timeline
Log In to Comment