Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: George France <france@handhelds.org>
To: axp-list@redhat.com, Uncle George <gatgul@voicenet.com>
Subject: Re: unaligned traps question
Date: Tue, 15 Oct 2002 11:39:36 -0400	[thread overview]
Message-ID: <02101511393604.01593@shadowfax.middleearth> (raw)
In-Reply-To: <3DAB7754.F6F5D8B0@voicenet.com>

On Monday 14 October 2002 22:03, Uncle George wrote:
> I suppose one might say that all misalignments are trapped. The kernel then
> figures out what to do.

close enough.

> If the misalignment is within the kernel, that also traps, but the kernel
> gets a little peaved. This generally happens when a new device driver is
> included ( ie never tested on a 64bit machine before.)
> If misalignment is within user space, then there is a per-process flag ( i
> think a dec-unix ( OSF?) flag ) to indicate that a user fault should
> happen, or an automatic 'fixup' should happen ( and the user would be none
> to the wiser.)   I think with the 'user fault' category, then kernel can
> either stop the task, or trap to the user task for the user to determine
> what to do.

Alignment traps are not a serious bug but will make the code run significantly
slower.  They are mostly really annoying.

>
> And Yes, gcc et al ( particularuly ) the runtime start-up code does set
> this flag. I cannot tell you who deceides this ( ie kernel is set to trap,
> but glibc tells the kernel to silently fix these things up. or the other
> way around.)

Please see:

   linux/arch/alpha/mm/fault.c

and

   alignment.c (included as attachment in previous e-mail)

for the exact details.

>
> I would like to see the unalignment faults, maybe then these things 'might'
> get fixed. The theory, i suppose, is that maybe you can find the 'coder'
> who in all likelyhood only thinks in intel, and probably has no time to
> delve into the problem - ergo a lot of trap messages with no one to repair
> same!

Location and repair is usually trivial with 'alignment.c'. Used properly it will
take you to the line of code that is causing the issue.  There are occasions
when the problem is severe and the program should just re-architect-ed.

Best Regards,


--George




  reply	other threads:[~2002-10-15 15:40 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-15  0:50 unaligned traps question Ram Viswanadha
2002-10-15  1:38 ` Michal Jaegermann
2002-10-15  2:03 ` Uncle George
2002-10-15 15:39   ` George France [this message]
2002-10-15 16:46     ` Michal Jaegermann
2002-10-15 18:24       ` alvin
2002-10-15 19:33         ` George France
2002-10-15 19:40         ` Falk Hueffner
     [not found]         ` <3DAC6EF2.BC962839@voicenet.com>
2002-10-16 18:15           ` alvin
2002-10-16 19:18             ` George France
2002-10-16 19:45               ` Falk Hueffner
2002-10-16 20:08                 ` George France
2002-10-17 18:37                   ` Falk Hueffner
2002-10-16 20:23             ` Michal Jaegermann
2002-10-16 21:30               ` alvin
2002-10-17  1:47             ` Uncle George
2002-10-15 18:08     ` Uncle George
2002-10-15 19:29       ` George France
2002-10-15 20:10         ` Uncle George
2002-10-15 20:46           ` George France
2002-10-15 15:33 ` George France
2002-10-17 22:17   ` Ram Viswanadha
2002-10-18 15:36     ` Michal Jaegermann
2002-10-18 17:17       ` Ram Viswanadha
2002-10-18 18:47         ` Michal Jaegermann
     [not found] <673E0A4C-E1DF-11D6-AC80-000393768D2C@mcgillsociety.org>
2002-10-17 15:50 ` George France
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox