Messages in this thread Patch in this message | | | Date | Tue, 13 Jun 2006 21:54:30 +0200 | From | Andreas Mohr <> | Subject | [PATCH -mm] x86_64 apic.h cpu_relax() (was: [RFC -mm] more cpu_relax() places?) |
| |
Hi all,
On Mon, Jun 12, 2006 at 08:37:43PM +0200, Andreas Mohr wrote: > Hi all, > > while reviewing 2.6.17-rc6-mm1, I found some places that might > want to make use of cpu_relax() in order to not block secondary > pipelines while busy-polling (probably especially useful on SMT CPUs):
Patch no. 3 of 3.
This one is adding a cpu_relax() that already existed in the i386 version. Any reason this wasn't there, too?
Signed-off-by: Andreas Mohr <andi@lisas.de>
diff -urN linux-2.6.17-rc6-mm2.orig/include/asm-x86_64/apic.h linux-2.6.17-rc6-mm2.my/include/asm-x86_64/apic.h --- linux-2.6.17-rc6-mm2.orig/include/asm-x86_64/apic.h 2006-06-13 19:28:16.000000000 +0200 +++ linux-2.6.17-rc6-mm2.my/include/asm-x86_64/apic.h 2006-06-13 19:34:08.000000000 +0200 @@ -49,7 +49,8 @@ static __inline__ void apic_wait_icr_idle(void) { - while ( apic_read( APIC_ICR ) & APIC_ICR_BUSY ); + while ( apic_read( APIC_ICR ) & APIC_ICR_BUSY ) + cpu_relax(); } static inline void ack_APIC_irq(void) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |