Messages in this thread Patch in this message | | | Date | Fri, 18 Dec 1998 17:00:35 +0100 (CET) | From | Andrea Arcangeli <> | Subject | Re: pre-2.1.132-2.. |
| |
On Fri, 18 Dec 1998, David S. Miller wrote:
> Date: Fri, 18 Dec 1998 15:37:46 +0100 (CET) > From: Andrea Arcangeli <andrea@e-mind.com> > > This patch remove the unused bits. I don' t know what they are used for... > Maybe for alignment, but without them the irq_desc_t struct is just 32*4 > bits so it seems just word aligned to me... > >Aieee, don't do this! They are cache line sized to decrease bus >traffic on SMP.
Ah that was the point, so OK thanks ;)
The cache lines for the P6 family and Pentium processors' L1 and L2 caches are 32 bytes wide. The processor always reads a cache line from system memory beginning on a 32-byte boundary. (A 32-byte aligned cache line begins at an address with its 5 least-significant bits clear.) A cache line can be filled from memory with a 4-transfer burst transaction. The caches do not support partially-filled cache lines, so caching even a single doubleword requires caching an entire line. (The cache line size for the Intel486 processor is 16 bytes.)
If I interpret well the docs we was just far from not overlap cachelines in SMP. I think this patch will fix the alignment though ;))
Index: linux/arch/i386/kernel/irq.c diff -u linux/arch/i386/kernel/irq.c:1.1.1.2 linux/arch/i386/kernel/irq.c:1.1.1.1.2.6 --- linux/arch/i386/kernel/irq.c:1.1.1.2 Fri Dec 18 10:16:20 1998 +++ linux/arch/i386/kernel/irq.c Fri Dec 18 16:56:27 1998 @@ -117,7 +117,7 @@ disable_8259A_irq }; -irq_desc_t irq_desc[NR_IRQS] = { +irq_desc_t irq_desc[NR_IRQS] __attribute__ ((aligned (32))) = { [0 ... 15] = { 0, &i8259A_irq_type, }, /* default to standard ISA IRQs */ [16 ... NR_IRQS-1] = { 0, &no_irq_type, }, /* 'high' PCI IRQs filled in on demand */ }; Index: linux/arch/i386/kernel/irq.h diff -u linux/arch/i386/kernel/irq.h:1.1.1.2 linux/arch/i386/kernel/irq.h:1.1.1.1.2.4 --- linux/arch/i386/kernel/irq.h:1.1.1.2 Fri Dec 18 10:16:20 1998 +++ linux/arch/i386/kernel/irq.h Fri Dec 18 16:59:23 1998 @@ -38,7 +38,9 @@ struct hw_interrupt_type *handler; /* handle/enable/disable functions */ struct irqaction *action; /* IRQ action list */ unsigned int depth; /* Disable depth for nested irq disables */ - unsigned int unused[2]; +#ifdef __SMP__ + unsigned int unused[4]; +#endif } irq_desc_t; #define IRQ0_TRAP_VECTOR 0x51
Andrea Arcangeli
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |