Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/xen/xen Don't unconditionally call pmap_extract_ma, ...



details:   https://anonhg.NetBSD.org/src/rev/07b1c4a6743b
branches:  trunk
changeset: 365267:07b1c4a6743b
user:      maxv <maxv%NetBSD.org@localhost>
date:      Fri Aug 10 06:23:12 2018 +0000

description:
Don't unconditionally call pmap_extract_ma, it is part of XENNET_DEBUG.
This call costs us.

diffstat:

 sys/arch/xen/xen/if_xennet_xenbus.c |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (49 lines):

diff -r 82f2519a9643 -r 07b1c4a6743b sys/arch/xen/xen/if_xennet_xenbus.c
--- a/sys/arch/xen/xen/if_xennet_xenbus.c       Fri Aug 10 04:44:15 2018 +0000
+++ b/sys/arch/xen/xen/if_xennet_xenbus.c       Fri Aug 10 06:23:12 2018 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: if_xennet_xenbus.c,v 1.77 2018/06/26 06:48:00 msaitoh Exp $      */
+/*      $NetBSD: if_xennet_xenbus.c,v 1.78 2018/08/10 06:23:12 maxv Exp $      */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -84,7 +84,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_xennet_xenbus.c,v 1.77 2018/06/26 06:48:00 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_xennet_xenbus.c,v 1.78 2018/08/10 06:23:12 maxv Exp $");
 
 #include "opt_xen.h"
 #include "opt_nfs_boot.h"
@@ -131,6 +131,7 @@
 
 #undef XENNET_DEBUG_DUMP
 #undef XENNET_DEBUG
+
 #ifdef XENNET_DEBUG
 #define XEDB_FOLLOW     0x01
 #define XEDB_INIT       0x02
@@ -1171,7 +1172,7 @@
        struct mbuf *m, *new_m;
        netif_tx_request_t *txreq;
        RING_IDX req_prod;
-       paddr_t pa, pa2;
+       paddr_t pa;
        struct xennet_txreq *req;
        int notify;
        int do_notify = 0;
@@ -1290,9 +1291,13 @@
                    "mbuf %p, buf %p/%p/%p, size %d\n",
                    req->txreq_id, m, mtod(m, void *), (void *)pa,
                    (void *)xpmap_ptom_masked(pa), m->m_pkthdr.len));
+#ifdef XENNET_DEBUG
+               paddr_t pa2;
                pmap_extract_ma(pmap_kernel(), mtod(m, vaddr_t), &pa2);
                DPRINTFN(XEDB_MBUF, ("xennet_start pa %p ma %p/%p\n",
                    (void *)pa, (void *)xpmap_ptom_masked(pa), (void *)pa2));
+#endif
+
 #ifdef XENNET_DEBUG_DUMP
                xennet_hex_dump(mtod(m, u_char *), m->m_pkthdr.len, "s",
                                req->txreq_id);



Home | Main Index | Thread Index | Old Index