From owner-svn-src-projects@FreeBSD.ORG Mon Jun 1 08:32:25 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5AAA2106566C; Mon, 1 Jun 2009 08:32:24 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 48F728FC21; Mon, 1 Jun 2009 08:32:24 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n518WOG7069901; Mon, 1 Jun 2009 08:32:24 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n518WOG4069900; Mon, 1 Jun 2009 08:32:24 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200906010832.n518WOG4069900@svn.freebsd.org> From: Robert Watson Date: Mon, 1 Jun 2009 08:32:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193209 - projects/pnet/sys/net X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jun 2009 08:32:26 -0000 Author: rwatson Date: Mon Jun 1 08:32:24 2009 New Revision: 193209 URL: http://svn.freebsd.org/changeset/base/193209 Log: Count wakeups sent and wakeups processed for netisr workstreams. Modified: projects/pnet/sys/net/netisr.c Modified: projects/pnet/sys/net/netisr.c ============================================================================== --- projects/pnet/sys/net/netisr.c Mon Jun 1 08:17:00 2009 (r193208) +++ projects/pnet/sys/net/netisr.c Mon Jun 1 08:32:24 2009 (r193209) @@ -248,6 +248,8 @@ struct netisr_workstream { u_int nws_cpu; /* CPU pinning. */ u_int nws_flags; /* Wakeup flags. */ u_int nws_pendingbits; /* Scheduled protocols. */ + u_int64_t nws_wakeupssent; /* How many times scheduled. */ + u_int64_t nws_wakeups; /* How many times woken up. */ /* * Each protocol has per-workstream data. @@ -290,7 +292,11 @@ SYSCTL_INT(_net_isr, OID_AUTO, numthread #define NWS_LOCK(s) mtx_lock(&(s)->nws_mtx) #define NWS_LOCK_ASSERT(s) mtx_assert(&(s)->nws_mtx, MA_OWNED) #define NWS_UNLOCK(s) mtx_unlock(&(s)->nws_mtx) -#define NWS_SIGNAL(s) swi_sched((s)->nws_swi_cookie, 0) +#define NWS_SIGNAL(s) do { \ + (s)->nws_wakeupssent++; \ + swi_sched((s)->nws_swi_cookie, 0); \ +} while (0) + /* * Utility routines for protocols that implement their own mapping of flows @@ -732,6 +738,7 @@ swi_net(void *arg) NETISR_RLOCK(&tracker); #endif NWS_LOCK(nwsp); + nwsp->nws_wakeups++; KASSERT(!(nwsp->nws_flags & NWS_RUNNING), ("swi_net: running")); if (nwsp->nws_flags & NWS_DISPATCHING) goto out;