freebsd-dev/sys
Bruce Evans d5c90663b2 Don't use plain "ret" instructions at targets of jump instructions,
since the branch caches on at least Athlon XP through Athlon 64 CPU's
don't understand such instructions and guarantee a cache miss taking
at least 10 cycles.  Use the documented workaround "ret $0" instead
("nop; ret" also works, but "ret $0" is probably faster on old CPUs).

Normal code (even asm code) doesn't branch to "ret", since there is
usually some cleanup to do, but the __mcount, .mcount and .mexitcount
entry points were optimized too well to have the minimum number of
instructions (3 instructions each if profiling is not enabled) and
they did this.  I didn't see a significant number of cache misses for
.mexitcount, but for the shared "ret" for __mcount and .mcount I
observed cache misses costing 26 cycles each.  For a send(2) syscall
that makes about 70 function calls, the cost of these cache misses
alone increased the syscall time from about 4000 cycles to about 7000
cycles.  4000 is for a profiling (GUPROF) kernel with profiling disabled;
after this fix, configuring profiling only costs about 600 cycles in the
4000, which is consistent with almost perfect branch prediction in the
mcounting calls.
2007-11-29 02:01:21 +00:00
..
amd64 Don't use plain "ret" instructions at targets of jump instructions, 2007-11-29 02:01:21 +00:00
arm Fixes for ARM9/ARM10 : 2007-11-28 22:55:55 +00:00
boot Add a note to indicate that these files do borrow in part from mbr.s and 2007-11-26 21:29:59 +00:00
bsm Merge OpenBSM 1.0 changes to src/sys/bsm: 2007-10-29 18:47:25 +00:00
cam Fix a change in the previous commit that was actually a type-o. 2007-11-15 16:23:38 +00:00
cddl Remove some compatibility stuff that we now get from the Solaris header. 2007-11-29 00:15:08 +00:00
compat Remove some compatibility stuff that we now get from the Solaris header. 2007-11-29 00:15:08 +00:00
conf Make ADAPTIVE_GIANT as the default in the kernel and remove the option. 2007-11-28 05:50:45 +00:00
contrib * Check endianness the FreeBSD way. 2007-11-28 22:16:00 +00:00
crypto Commit the change from FAST_IPSEC to IPSEC. The FAST_IPSEC 2007-07-03 12:13:45 +00:00
ddb Make the examine command honor db_pager_quit so you can use 'q' or 'x' 2007-10-27 20:19:11 +00:00
dev Add COHERENT to descriptor mem allocation for the 2007-11-28 23:04:11 +00:00
fs o English lesson from bde@: "iff" is not a typo, it means "if and only if". 2007-11-18 09:21:30 +00:00
gdb
geom On some arches, openssl is built with OPENSSL_NO_CAMELLIA, so the 2007-11-19 08:59:32 +00:00
gnu Remove duplicate "union" from ext2_opts. 2007-10-27 16:14:33 +00:00
i4b Spelling fix for interupt -> interrupt 2007-10-12 06:03:46 +00:00
i386 Don't use plain "ret" instructions at targets of jump instructions, 2007-11-29 02:01:21 +00:00
ia64 Remove the 'needbounce' variable from the _bus_dmamap_load_buffer() 2007-11-27 17:28:12 +00:00
isa Split /dev/nvram driver out of isa/clock.c for i386 and amd64. I have not 2007-10-26 03:23:54 +00:00
kern Make ADAPTIVE_GIANT as the default in the kernel and remove the option. 2007-11-28 05:50:45 +00:00
libkern Do not use __XSCALE__ to detect if clz is available, use _ARM_ARCH_5 instead. 2007-10-13 12:05:36 +00:00
modules Remove _SOLARIS_C_SOURCE now that it doesn't do anything in FreeBSD 2007-11-28 22:58:09 +00:00
net Add sysctls to if_enc(4) to control whether the firewalls or 2007-11-28 22:33:53 +00:00
net80211 Be more careful handling off-channel frames: if the driver (wrongly) 2007-11-26 21:28:18 +00:00
netatalk Annotate two possible bugs in a comment: (1) we allocate and explicitly 2007-11-20 18:50:54 +00:00
netatm Disconnect netatm from the build as it is not MPSAFE and relies on 2007-07-14 21:49:24 +00:00
netgraph - Merge all the ng_send_fn2* functions into one - ng_send_fn2(), 2007-11-14 11:25:58 +00:00
netinet Let opt be an array. Though &opt[0] == opt == &opt, &opt is highly 2007-11-28 13:33:27 +00:00
netinet6 Instead of manually freeing the packet options structure (and not even doing 2007-11-21 16:01:42 +00:00
netipsec Add sysctls to if_enc(4) to control whether the firewalls or 2007-11-28 22:33:53 +00:00
netipx Make tcpstates[] static, and make sure TCPSTATES is defined before 2007-07-30 11:06:42 +00:00
netnatm
netncp
netsmb Rename the kthread_xxx (e.g. kthread_create()) calls 2007-10-20 23:23:23 +00:00
nfs
nfs4client Rename the kthread_xxx (e.g. kthread_create()) calls 2007-10-20 23:23:23 +00:00
nfsclient Remove hacks from the NFSv2/3 client intended to handle a lack of a 2007-11-19 16:03:21 +00:00
nfsserver Garbage collect now-unused nfsrv_setcred() -- it's not only unused, but 2007-11-04 19:20:33 +00:00
opencrypto Rename the kthread_xxx (e.g. kthread_create()) calls 2007-10-20 23:23:23 +00:00
pc98 MFi386: revision 1.661 2007-11-14 12:29:09 +00:00
pccard
pci Add the FNW3603TX Planex NIC. 2007-11-26 18:25:07 +00:00
powerpc Define atomic_readandclear_ptr. 2007-11-27 06:34:15 +00:00
rpc Remove the now-unused NET_{LOCK,UNLOCK,ASSERT}_GIANT() macros, which 2007-08-06 14:26:03 +00:00
security Implement per-object type consistency checks for labels passed to 2007-10-30 00:01:28 +00:00
sparc64 Make ADAPTIVE_GIANT as the default in the kernel and remove the option. 2007-11-28 05:50:45 +00:00
sun4v Make ADAPTIVE_GIANT as the default in the kernel and remove the option. 2007-11-28 05:50:45 +00:00
sys Remove an OpenSolaris compatibility header that is no longer referenced. 2007-11-28 23:21:55 +00:00
tools
ufs Fix build without INVARIANTS and update a comment to match 2007-11-09 11:04:36 +00:00
vm Make contigmalloc(9)'s page laundering more robust. Specifically, use 2007-11-25 20:37:29 +00:00
Makefile Complete repo-copy and move of Coda from src/sys/coda to src/sys/fs/coda 2007-07-12 21:04:58 +00:00