* [net-next-2.6 PATCH] x86: Drop CONFIG_MCORE2 check around setting of NET_IP_ALIGN
@ 2010-07-01 23:28 Jeff Kirsher
2010-07-02 0:26 ` Stephen Hemminger
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jeff Kirsher @ 2010-07-01 23:28 UTC (permalink / raw)
To: davem
Cc: netdev, gospo, bphilips, Andi Kleen, Thomas Gleixner, Ingo Molnar,
H. Peter Anvin, x86, Alexander Duyck, Jeff Kirsher
From: Alexander Duyck <alexander.h.duyck@intel.com>
This patch removes the CONFIG_MCORE2 check from around NET_IP_ALIGN. It is
based on a suggestion from Andi Kleen. The assumption is that there are
not any x86 cores where unaligned access is really slow, and this change
would allow for a performance improvement to still exist on configurations
that are not necessarily optimized for Core 2.
Cc: Andi Kleen <ak@linux.intel.com>
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>
---
arch/x86/include/asm/system.h | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/system.h b/arch/x86/include/asm/system.h
index b4293fc..1db9bd2 100644
--- a/arch/x86/include/asm/system.h
+++ b/arch/x86/include/asm/system.h
@@ -457,7 +457,6 @@ static inline void rdtsc_barrier(void)
alternative(ASM_NOP3, "lfence", X86_FEATURE_LFENCE_RDTSC);
}
-#ifdef CONFIG_MCORE2
/*
* We handle most unaligned accesses in hardware. On the other hand
* unaligned DMA can be quite expensive on some Nehalem processors.
@@ -465,5 +464,4 @@ static inline void rdtsc_barrier(void)
* Based on this we disable the IP header alignment in network drivers.
*/
#define NET_IP_ALIGN 0
-#endif
#endif /* _ASM_X86_SYSTEM_H */
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [net-next-2.6 PATCH] x86: Drop CONFIG_MCORE2 check around setting of NET_IP_ALIGN
2010-07-01 23:28 [net-next-2.6 PATCH] x86: Drop CONFIG_MCORE2 check around setting of NET_IP_ALIGN Jeff Kirsher
@ 2010-07-02 0:26 ` Stephen Hemminger
2010-07-02 1:15 ` H. Peter Anvin
2010-07-02 5:49 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2010-07-02 0:26 UTC (permalink / raw)
To: Jeff Kirsher
Cc: davem, netdev, gospo, bphilips, Andi Kleen, Thomas Gleixner,
Ingo Molnar, H. Peter Anvin, x86, Alexander Duyck
On Thu, 01 Jul 2010 16:28:27 -0700
Jeff Kirsher <jeffrey.t.kirsher@intel.com> wrote:
> From: Alexander Duyck <alexander.h.duyck@intel.com>
>
> This patch removes the CONFIG_MCORE2 check from around NET_IP_ALIGN. It is
> based on a suggestion from Andi Kleen. The assumption is that there are
> not any x86 cores where unaligned access is really slow, and this change
> would allow for a performance improvement to still exist on configurations
> that are not necessarily optimized for Core 2.
>
> Cc: Andi Kleen <ak@linux.intel.com>
> 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>
> ---
This is a good idea, but warnig it may end up masking broken
hardware. Developers of new drivers will end up never
exercising unaligned DMA, resulting in hardware
that doesn't work on platforms that have NET_IP_ALIGN set
to 2.
--
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [net-next-2.6 PATCH] x86: Drop CONFIG_MCORE2 check around setting of NET_IP_ALIGN
2010-07-01 23:28 [net-next-2.6 PATCH] x86: Drop CONFIG_MCORE2 check around setting of NET_IP_ALIGN Jeff Kirsher
2010-07-02 0:26 ` Stephen Hemminger
@ 2010-07-02 1:15 ` H. Peter Anvin
2010-07-02 5:49 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: H. Peter Anvin @ 2010-07-02 1:15 UTC (permalink / raw)
To: Jeff Kirsher
Cc: davem, netdev, gospo, bphilips, Andi Kleen, Thomas Gleixner,
Ingo Molnar, x86, Alexander Duyck
On 07/01/2010 04:28 PM, Jeff Kirsher wrote:
> From: Alexander Duyck <alexander.h.duyck@intel.com>
>
> This patch removes the CONFIG_MCORE2 check from around NET_IP_ALIGN. It is
> based on a suggestion from Andi Kleen. The assumption is that there are
> not any x86 cores where unaligned access is really slow, and this change
> would allow for a performance improvement to still exist on configurations
> that are not necessarily optimized for Core 2.
>
> Cc: Andi Kleen <ak@linux.intel.com>
> 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>
-hpa
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [net-next-2.6 PATCH] x86: Drop CONFIG_MCORE2 check around setting of NET_IP_ALIGN
2010-07-01 23:28 [net-next-2.6 PATCH] x86: Drop CONFIG_MCORE2 check around setting of NET_IP_ALIGN Jeff Kirsher
2010-07-02 0:26 ` Stephen Hemminger
2010-07-02 1:15 ` H. Peter Anvin
@ 2010-07-02 5:49 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2010-07-02 5:49 UTC (permalink / raw)
To: jeffrey.t.kirsher
Cc: netdev, gospo, bphilips, ak, tglx, mingo, hpa, x86,
alexander.h.duyck
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Thu, 01 Jul 2010 16:28:27 -0700
> From: Alexander Duyck <alexander.h.duyck@intel.com>
>
> This patch removes the CONFIG_MCORE2 check from around NET_IP_ALIGN. It is
> based on a suggestion from Andi Kleen. The assumption is that there are
> not any x86 cores where unaligned access is really slow, and this change
> would allow for a performance improvement to still exist on configurations
> that are not necessarily optimized for Core 2.
>
> Cc: Andi Kleen <ak@linux.intel.com>
> 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>
Applied, with HPA's ack.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-07-02 5:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-01 23:28 [net-next-2.6 PATCH] x86: Drop CONFIG_MCORE2 check around setting of NET_IP_ALIGN Jeff Kirsher
2010-07-02 0:26 ` Stephen Hemminger
2010-07-02 1:15 ` H. Peter Anvin
2010-07-02 5:49 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).