aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2010-06-29 14:38:00 -0400
committerDavid S. Miller <davem@davemloft.net>2010-06-30 17:34:09 -0400
commitea812ca1b06113597adcd8e70c0f84a413d97544 (patch)
treee5846a631aefbcdec0a6542962e1780849fee97c /arch
parentcb836a977f71f76ccbb1ff35b9c113ace96377e9 (diff)
x86: Align skb w/ start of cacheline on newer core 2/Xeon Arch
x86 architectures can handle unaligned accesses in hardware, and it has been shown that unaligned DMA accesses can be expensive on Nehalem architectures. As such we should overwrite NET_IP_ALIGN to resolve this issue. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: x86@kernel.org Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Acked-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/include/asm/system.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/include/asm/system.h b/arch/x86/include/asm/system.h
index b8fe48ee2ed9..b4293fc8b798 100644
--- a/arch/x86/include/asm/system.h
+++ b/arch/x86/include/asm/system.h
@@ -457,4 +457,13 @@ static inline void rdtsc_barrier(void)
457 alternative(ASM_NOP3, "lfence", X86_FEATURE_LFENCE_RDTSC); 457 alternative(ASM_NOP3, "lfence", X86_FEATURE_LFENCE_RDTSC);
458} 458}
459 459
460#ifdef CONFIG_MCORE2
461/*
462 * We handle most unaligned accesses in hardware. On the other hand
463 * unaligned DMA can be quite expensive on some Nehalem processors.
464 *
465 * Based on this we disable the IP header alignment in network drivers.
466 */
467#define NET_IP_ALIGN 0
468#endif
460#endif /* _ASM_X86_SYSTEM_H */ 469#endif /* _ASM_X86_SYSTEM_H */