Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern mcl_cache: align items to COHERENCY_UNIT



details:   https://anonhg.NetBSD.org/src/rev/6508aa7e0781
branches:  trunk
changeset: 845855:6508aa7e0781
user:      tnn <tnn%NetBSD.org@localhost>
date:      Sat Oct 19 06:36:47 2019 +0000

description:
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.

diffstat:

 sys/kern/uipc_mbuf.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r 5606c0f33c18 -r 6508aa7e0781 sys/kern/uipc_mbuf.c
--- a/sys/kern/uipc_mbuf.c      Fri Oct 18 23:08:29 2019 +0000
+++ b/sys/kern/uipc_mbuf.c      Sat Oct 19 06:36:47 2019 +0000
@@ -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 @@
            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);



Home | Main Index | Thread Index | Old Index