Linux-kernel mailing list archive 2000-04,: Re: Preventing gcc from aligning stack???

# Re: Preventing gcc from aligning stack???

Jamie Lokier (lkd@tantalophile.demon.co.uk)
Wed, 26 Jan 2000 14:19:35 +0100

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Michael Kwasigroch: "2.2.1[34]: /dev/ttyS1 affects /dev/ttyS0 [update]"
- Previous message: Peter Samuelson: "Re: 2.2.10-14 i686 SMP: IDE RAID-5 array hangs on mount"

David Weinehall wrote:
> > > sched.c:77: warning: alignment of `aligned_data' is greater than maximum
> > > object file alignment
> >
> > That's not i386 is it?
>
> 486.

Hmm. I'm surprised. Linux 2.3.x only compiles in ELF, and ELF permits
big alignments. Oddness.

> > Linux uses larger alignments for some things that should be aligned to a
> > cache line, either to reduce SMP inter-processor traffic or simply
> > because it's faster to read fewer cache lines for some critical things.
>
> I doubt this is a good idea on 386's/486's, but I might be wrong...

On 486s it's a good idea because they have a cache. cf. Recent patch
from IBM which speeds up the scheduler simply be moving some memory
accesses to within a cache line. A smaller alignment value might be
more suitable for a 486 though. Some nominal 386s have a cache too.

enjoy,
-- Jamie

-
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/

- Next message: Michael Kwasigroch: "2.2.1[34]: /dev/ttyS1 affects /dev/ttyS0 [update]"
- Previous message: Peter Samuelson: "Re: 2.2.10-14 i686 SMP: IDE RAID-5 array hangs on mount"