Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Michal Jaegermann <michal@ellpspace.math.ualberta.ca>
To: axp-list@redhat.com
Subject: Re: problems with md driver (RAID-1) on RH 7.2, DP264 machine -- SOLUTION
Date: Tue, 24 Sep 2002 12:28:47 -0600	[thread overview]
Message-ID: <20020924122847.A15598@ellpspace.math.ualberta.ca> (raw)
In-Reply-To: <3D909F24.492C847@iplink.net>; from alvin@iplink.net on Tue, Sep 24, 2002 at 01:21:40PM -0400

On Tue, Sep 24, 2002 at 01:21:40PM -0400, alvin wrote:
> 
> I found and replaced a number of cases of "xxx--; if ( xxx == yyy)" that
> were in raid1.c and that made the problem go away.

My point was that from what you are writing, contrary to what you
said, you had on hands a much smaller test case than the whole kernel.
I do not know how far it could be cut-down, as some bugs only do show
in a suitable context, but a size would be reasonable.

> > This is not that surprising. 'md_bugcheck' may have side effects

I meant "as far as optimizer knows" if that was not clear.

> Just to be on the safe side I created md_bugcheck another file and
> declared it as external. I knew that the gcc optimizer could optimize
> out the null procedure if it was in the same file. 

So once again you see that optimization is not crossing "compilation
unit" boundaries. :-)

Instead of a dummy function making some variables 'volatile' would
likely be enough to "cheat" an optimizer into a workaround.  A simpler
one would be to adjust optimization for this particular file.  Mind you
- this is not a fix by any means, only a hack to cover compiler bugs,
but from what George wrote the issue is known and people are working on
a fix.  This is what is important here.

  Michal

p.s. The other current optimizer bug I know of and which shows in
a kernel compilation, but which does not have such drastic effects, is
that if you will try to recompile on Alpha an ov511 for USB then with
default optimizations this will trigger an internal compiler bug and you
will end up with a segfault.  Any other optimization level but -O2 is ok
provided your CPU type is set to ev4.  A workaround is not to change
optimization flags for the whole kernel but to use
"EXTRA_CFLAGS := -O3 -mcpu=ev4" for that one particular file.  I have no
idea if this module actually works on Alpha but that way at least it
compiles without incidents. :-) Skipping that in a "custom" kernel would
work as well but not when you really want to use that module.




  parent reply	other threads:[~2002-09-24 18:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-03 14:21 problems with md driver (RAID-1) on RH 7.2, DP264 machine Chris Szilagyi
2002-09-24 13:58 ` problems with md driver (RAID-1) on RH 7.2, DP264 machine -- SOLUTION Chris Szilagyi
2002-09-24 14:59   ` alvin
2002-09-24 15:46     ` Falk Hueffner
2002-09-24 16:31       ` alvin
2002-09-24 16:40         ` George France
2002-09-24 16:38       ` George France
2002-09-24 16:42     ` Michal Jaegermann
2002-09-24 17:05       ` Chris Szilagyi
2002-09-24 17:21       ` alvin
2002-09-24 17:47         ` Chris Szilagyi
2002-09-24 18:28         ` Michal Jaegermann [this message]
2002-09-24 18:51           ` George France
2002-09-25  2:49             ` compiler features (was: problems with md driver (RAID-1) on RH 7.2, DP264 machine -- SOLUTION) Alvin Starr
2002-09-25  3:01               ` 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