Date: Sun, 7 Jun 2009 22:52:19 +0000 (UTC) From: Kip Macy <kmacy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r193661 - in user/kmacy/releng_7_2_fcs/sys: amd64/conf conf netinet sys Message-ID: <200906072252.n57MqJVD007977@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kmacy Date: Sun Jun 7 22:52:19 2009 New Revision: 193661 URL: http://svn.freebsd.org/changeset/base/193661 Log: - add pcpu ipid as performance hack Modified: user/kmacy/releng_7_2_fcs/sys/amd64/conf/GENERIC user/kmacy/releng_7_2_fcs/sys/conf/options user/kmacy/releng_7_2_fcs/sys/netinet/ip_output.c user/kmacy/releng_7_2_fcs/sys/sys/pcpu.h Modified: user/kmacy/releng_7_2_fcs/sys/amd64/conf/GENERIC ============================================================================== --- user/kmacy/releng_7_2_fcs/sys/amd64/conf/GENERIC Sun Jun 7 22:50:45 2009 (r193660) +++ user/kmacy/releng_7_2_fcs/sys/amd64/conf/GENERIC Sun Jun 7 22:52:19 2009 (r193661) @@ -30,6 +30,7 @@ makeoptions MODULES_OVERRIDE="geom zfs c makeoptions OPENSOLARIS options OPENSOLARIS options ZFS +options NO_SLOW_STATS options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption Modified: user/kmacy/releng_7_2_fcs/sys/conf/options ============================================================================== --- user/kmacy/releng_7_2_fcs/sys/conf/options Sun Jun 7 22:50:45 2009 (r193660) +++ user/kmacy/releng_7_2_fcs/sys/conf/options Sun Jun 7 22:52:19 2009 (r193661) @@ -781,3 +781,8 @@ INTR_FILTER opt_global.h # Virtualize the network stack VIMAGE opt_global.h VIMAGE_GLOBALS opt_global.h + + +# remove slow stats keeping +NO_SLOW_STATS opt_global.h + Modified: user/kmacy/releng_7_2_fcs/sys/netinet/ip_output.c ============================================================================== --- user/kmacy/releng_7_2_fcs/sys/netinet/ip_output.c Sun Jun 7 22:50:45 2009 (r193660) +++ user/kmacy/releng_7_2_fcs/sys/netinet/ip_output.c Sun Jun 7 22:52:19 2009 (r193661) @@ -190,8 +190,13 @@ ip_output(struct mbuf *m, struct mbuf *o if ((flags & (IP_FORWARDING|IP_RAWOUTPUT)) == 0) { ip->ip_v = IPVERSION; ip->ip_hl = hlen >> 2; +#ifndef NO_SLOW_STATS ip->ip_id = ip_newid(); V_ipstat.ips_localout++; +#else + ip->ip_id = PCPU_GET(ipid); + PCPU_INC(ipid, 1); +#endif } else { hlen = ip->ip_hl << 2; } Modified: user/kmacy/releng_7_2_fcs/sys/sys/pcpu.h ============================================================================== --- user/kmacy/releng_7_2_fcs/sys/sys/pcpu.h Sun Jun 7 22:50:45 2009 (r193660) +++ user/kmacy/releng_7_2_fcs/sys/sys/pcpu.h Sun Jun 7 22:52:19 2009 (r193661) @@ -72,6 +72,8 @@ struct pcpu { uint64_t pc_switchtime; int pc_switchticks; u_int pc_cpuid; /* This cpu number */ + u_short pc_ipid; + u_short pc_short_pad; cpumask_t pc_cpumask; /* This cpu mask */ cpumask_t pc_other_cpus; /* Mask of all other cpus */ SLIST_ENTRY(pcpu) pc_allcpu;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906072252.n57MqJVD007977>