Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144359296
D42259.id129060.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
D42259.id129060.diff
View Options
diff --git a/sys/vm/uma.h b/sys/vm/uma.h
--- a/sys/vm/uma.h
+++ b/sys/vm/uma.h
@@ -301,7 +301,7 @@
#define UMA_ALIGN_INT (sizeof(int) - 1) /* "" int */
#define UMA_ALIGN_SHORT (sizeof(short) - 1) /* "" short */
#define UMA_ALIGN_CHAR (sizeof(char) - 1) /* "" char */
-#define UMA_ALIGN_CACHE (0 - 1) /* Cache line size align */
+#define UMA_ALIGN_CACHE (uma_get_cache_align_mask()) /* Cache line size align */
#define UMA_ALIGNOF(type) (_Alignof(type) - 1) /* Alignment fit for 'type' */
#define UMA_ANYDOMAIN -1 /* Special value for domain search. */
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c
--- a/sys/vm/uma_core.c
+++ b/sys/vm/uma_core.c
@@ -3243,7 +3243,7 @@
args.size = size;
args.uminit = uminit;
args.fini = fini;
- args.align = (align == UMA_ALIGN_CACHE) ? uma_cache_align_mask : align;
+ args.align = align;
args.flags = flags;
args.zone = zone;
return (zone_alloc_item(kegs, &args, UMA_ANYDOMAIN, M_WAITOK));
@@ -3256,7 +3256,6 @@
{
if (mask >= 0)
- /* UMA_ALIGN_CACHE is also not permitted here. */
uma_cache_align_mask = mask;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Feb 9, 1:09 AM (12 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28494087
Default Alt Text
D42259.id129060.diff (1 KB)
Attached To
Mode
D42259: uma: UMA_ALIGN_CACHE: Resolve the proper value at use point
Attached
Detach File
Event Timeline
Log In to Comment