Page MenuHomeFreeBSD

D42259.id129060.diff
No OneTemporary

D42259.id129060.diff

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

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)

Event Timeline