svn commit: r193661 - in user/kmacy/releng_7_2_fcs/sys: amd64/conf
conf netinet sys
Kip Macy
kmacy at FreeBSD.org
Sun Jun 7 22:52:20 UTC 2009
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;
More information about the svn-src-user
mailing list