Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Remove these global variables. They are unused, rac...



details:   https://anonhg.NetBSD.org/src/rev/9d1332637a19
branches:  trunk
changeset: 321545:9d1332637a19
user:      maxv <maxv%NetBSD.org@localhost>
date:      Wed Mar 21 16:26:04 2018 +0000

description:
Remove these global variables. They are unused, racy, and the only thing
they do is triggering cache synchronization latencies between CPUs.

diffstat:

 sys/kern/uipc_mbuf.c |  17 ++---------------
 1 files changed, 2 insertions(+), 15 deletions(-)

diffs (84 lines):

diff -r f0d285cacc13 -r 9d1332637a19 sys/kern/uipc_mbuf.c
--- a/sys/kern/uipc_mbuf.c      Wed Mar 21 15:41:34 2018 +0000
+++ b/sys/kern/uipc_mbuf.c      Wed Mar 21 16:26:04 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uipc_mbuf.c,v 1.182 2018/03/09 11:57:38 maxv Exp $     */
+/*     $NetBSD: uipc_mbuf.c,v 1.183 2018/03/21 16:26:04 maxv Exp $     */
 
 /*
  * Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.182 2018/03/09 11:57:38 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.183 2018/03/21 16:26:04 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_mbuftrace.h"
@@ -707,8 +707,6 @@
  * continuing for "len" bytes.  If len is M_COPYALL, copy to end of mbuf.
  * The wait parameter is a choice of M_WAIT/M_DONTWAIT from caller.
  */
-int MCFail;
-
 struct mbuf *
 m_copym(struct mbuf *m, int off0, int len, int wait)
 {
@@ -812,14 +810,10 @@
                np = &n->m_next;
        }
 
-       if (top == NULL)
-               MCFail++;
-
        return top;
 
 nospace:
        m_freem(top);
-       MCFail++;
        return NULL;
 }
 
@@ -871,7 +865,6 @@
 
 nospace:
        m_freem(top);
-       MCFail++;
        return NULL;
 }
 
@@ -1082,8 +1075,6 @@
 /*
  * m_pullup: same as m_ensure_contig(), but destroys mbuf chain on error.
  */
-int MPFail;
-
 struct mbuf *
 m_pullup(struct mbuf *n, int len)
 {
@@ -1093,7 +1084,6 @@
        if (!m_ensure_contig(&m, len)) {
                KASSERT(m != NULL);
                m_freem(m);
-               MPFail++;
                m = NULL;
        }
        return m;
@@ -1104,8 +1094,6 @@
  * the amount of empty space before the data in the new mbuf to be specified
  * (in the event that the caller expects to prepend later).
  */
-int MSFail;
-
 struct mbuf *
 m_copyup(struct mbuf *n, int len, int dstoff)
 {
@@ -1145,7 +1133,6 @@
        return (m);
  bad:
        m_freem(n);
-       MSFail++;
        return (NULL);
 }
 



Home | Main Index | Thread Index | Old Index