From owner-svn-src-user@FreeBSD.ORG Sun Jun 7 22:50:46 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15EC71065676; Sun, 7 Jun 2009 22:50:46 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE85B8FC1C; Sun, 7 Jun 2009 22:50:45 +0000 (UTC) (envelope-from kmacy@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 n57Mojuo007914; Sun, 7 Jun 2009 22:50:45 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n57Mojee007913; Sun, 7 Jun 2009 22:50:45 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200906072250.n57Mojee007913@svn.freebsd.org> From: Kip Macy Date: Sun, 7 Jun 2009 22:50:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193660 - user/kmacy/releng_7_2_fcs/sys/net X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2009 22:50:46 -0000 Author: kmacy Date: Sun Jun 7 22:50:45 2009 New Revision: 193660 URL: http://svn.freebsd.org/changeset/base/193660 Log: keep stats per-cpu Modified: user/kmacy/releng_7_2_fcs/sys/net/flowtable.c Modified: user/kmacy/releng_7_2_fcs/sys/net/flowtable.c ============================================================================== --- user/kmacy/releng_7_2_fcs/sys/net/flowtable.c Sun Jun 7 22:50:16 2009 (r193659) +++ user/kmacy/releng_7_2_fcs/sys/net/flowtable.c Sun Jun 7 22:50:45 2009 (r193660) @@ -148,7 +148,8 @@ struct flowtable { uint32_t ft_allocated; uint32_t ft_misses; uint64_t ft_hits; - + uint64_t ft_lookups; + uint32_t ft_udp_idle; uint32_t ft_fin_wait_idle; uint32_t ft_syn_idle; @@ -164,13 +165,13 @@ struct flowtable { bitstr_t *ft_masks[MAXCPU]; bitstr_t *ft_tmpmask; struct flowtable *ft_next; -}; +} __aligned(128); static struct proc *flowcleanerproc; -static struct flowtable *flow_list_head; -static uint32_t hashjitter; -static uma_zone_t ipv4_zone; -static uma_zone_t ipv6_zone; +static struct flowtable *flow_list_head __aligned(128); +static uma_zone_t ipv4_zone __aligned(128); +static uma_zone_t ipv6_zone __aligned(128); +static uint32_t hashjitter __aligned(128); static struct cv flowclean_cv; static struct mtx flowclean_lock; @@ -606,7 +607,7 @@ flowtable_lookup(struct flowtable *ft, s if (hash == 0 || (key[0] == 0 && (ft->ft_flags & FL_HASH_PORTS))) return (ENOENT); - flowtable_lookups++; + ft->ft_lookups++; FL_ENTRY_LOCK(ft, hash); if ((fle = FL_ENTRY(ft, hash)) == NULL) { FL_ENTRY_UNLOCK(ft, hash); @@ -621,7 +622,7 @@ keycheck: && (proto == fle->f_proto) && (rt->rt_flags & RTF_UP) && (rt->rt_ifp != NULL)) { - flowtable_hits++; + ft->ft_hits++; fle->f_uptime = time_uptime; fle->f_flags |= flags; ro->ro_rt = rt; @@ -635,7 +636,7 @@ keycheck: FL_ENTRY_UNLOCK(ft, hash); uncached: - flowtable_misses++; + ft->ft_misses++; /* * This bit of code ends up locking the * same route 3 times (just like ip_output + ether_output)