Module Name: src
Committed By: tnn
Date: Sat Oct 19 06:36:47 UTC 2019
Modified Files:
src/sys/kern: uipc_mbuf.c
Log Message:
mcl_cache: align items to COHERENCY_UNIT
Because we do cache incoherent DMA to/from mbufs we cannot safely share
share cache lines with adjacent items that may be concurrently accessed.
To generate a diff of this commit:
cvs rdiff -u -r1.234 -r1.235 src/sys/kern/uipc_mbuf.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/uipc_mbuf.c
diff -u src/sys/kern/uipc_mbuf.c:1.234 src/sys/kern/uipc_mbuf.c:1.235
--- src/sys/kern/uipc_mbuf.c:1.234 Sat Sep 28 16:02:12 2019
+++ src/sys/kern/uipc_mbuf.c Sat Oct 19 06:36:47 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_mbuf.c,v 1.234 2019/09/28 16:02:12 jmcneill Exp $ */
+/* $NetBSD: uipc_mbuf.c,v 1.235 2019/10/19 06:36:47 tnn Exp $ */
/*
* Copyright (c) 1999, 2001, 2018 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.234 2019/09/28 16:02:12 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.235 2019/10/19 06:36:47 tnn Exp $");
#ifdef _KERNEL_OPT
#include "opt_mbuftrace.h"
@@ -188,8 +188,8 @@ mbinit(void)
NULL, IPL_VM, mb_ctor, NULL, NULL);
KASSERT(mb_cache != NULL);
- mcl_cache = pool_cache_init(mclbytes, 0, 0, 0, "mclpl", NULL,
- IPL_VM, NULL, NULL, NULL);
+ mcl_cache = pool_cache_init(mclbytes, COHERENCY_UNIT, 0, 0, "mclpl",
+ NULL, IPL_VM, NULL, NULL, NULL);
KASSERT(mcl_cache != NULL);
pool_cache_set_drain_hook(mb_cache, mb_drain, NULL);