diff options
author | lucy wang - Sun Microsystems - Beijing China <xiuyan.wang@Sun.COM> | 2009-03-26 09:54:44 +0800 |
---|---|---|
committer | lucy wang - Sun Microsystems - Beijing China <xiuyan.wang@Sun.COM> | 2009-03-26 09:54:44 +0800 |
commit | 94e7edb1e6b194fffd0e7901c0b32e9fc836bc5b (patch) | |
tree | 578105e1f80b27ca4200d731633225fbdbe1acf8 /usr/src/uts/intel/asm/cpu.h | |
parent | 09ce0d4acf1a79c720d7e54b60e87cbfa0f1b2d6 (diff) | |
download | illumos-joyent-94e7edb1e6b194fffd0e7901c0b32e9fc836bc5b.tar.gz |
6812228 No need to do software checksum for multiple-mblk packets in ip_tcp_input()
6694625 Performance falls off the cliff with large IO sizes
PSARC/2009/039 prefetch interfaces
6812282 PSARC 2009/039 prefetch interfaces
Contributed by Paul Durrant (pdurrant@solarflare.com)
Diffstat (limited to 'usr/src/uts/intel/asm/cpu.h')
-rw-r--r-- | usr/src/uts/intel/asm/cpu.h | 76 |
1 files changed, 51 insertions, 25 deletions
diff --git a/usr/src/uts/intel/asm/cpu.h b/usr/src/uts/intel/asm/cpu.h index 937c3c4103..c887111058 100644 --- a/usr/src/uts/intel/asm/cpu.h +++ b/usr/src/uts/intel/asm/cpu.h @@ -40,6 +40,57 @@ extern __inline__ void ht_pause(void) "pause"); } +/* + * prefetch 64 bytes + * + * prefetch is an SSE extension which is not supported on + * older 32-bit processors, so define this as a no-op for now + */ + +extern __inline__ void prefetch_read_many(void *addr) +{ +#if defined(__amd64) + __asm__( + "prefetcht0 (%0);" + "prefetcht0 32(%0);" + : /* no output */ + : "r" (addr)); +#endif /* __amd64 */ +} + +extern __inline__ void prefetch_read_once(void *addr) +{ +#if defined(__amd64) + __asm__( + "prefetchnta (%0);" + "prefetchnta 32(%0);" + : /* no output */ + : "r" (addr)); +#endif /* __amd64 */ +} + +extern __inline__ void prefetch_write_many(void *addr) +{ +#if defined(__amd64) + __asm__( + "prefetcht0 (%0);" + "prefetcht0 32(%0);" + : /* no output */ + : "r" (addr)); +#endif /* __amd64 */ +} + +extern __inline__ void prefetch_write_once(void *addr) +{ +#if defined(__amd64) + __asm__( + "prefetcht0 (%0);" + "prefetcht0 32(%0);" + : /* no output */ + : "r" (addr)); +#endif /* __amd64 */ +} + #if !defined(__xpv) extern __inline__ void cli(void) @@ -112,31 +163,6 @@ extern __inline__ void __swapgs(void) #endif /* !__lint && __GNUC__ */ -#if !defined(__lint) && defined(__GNUC__) - -#if defined(__i386) || defined(__amd64) - -/* - * prefetch 64 bytes - * prefetch is an SSE extension which is not supported on - * older 32-bit processors, so define this as a no-op for now - */ - -extern __inline__ void prefetch64(caddr_t addr) -{ -#if defined(__amd64) - __asm__ __volatile__( - "prefetcht0 (%0);" - "prefetcht0 32(%0)" - : /* no output */ - : "r" (addr)); -#endif /* __amd64 */ -} - -#endif /* __i386 || __amd64 */ - -#endif /* !__lint && __GNUC__ */ - #ifdef __cplusplus } #endif |