From: alvin <alvin@iplink.net>
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 13:21:40 -0400 [thread overview]
Message-ID: <3D909F24.492C847@iplink.net> (raw)
In-Reply-To: 20020924104200.A15133@ellpspace.math.ualberta.ca
Michal Jaegermann wrote:
>
> On Tue, Sep 24, 2002 at 10:59:01AM -0400, alvin wrote:
> > Chris Szilagyi wrote:
> > >
> > > The solution to this problem is to
> > > add "-fno-strength-reduce" to CFLAGS in arch/alpha/Makefile and recompile
> > > the entire kernel.
>
> But this affects files in a subdirectory arch/alpha or these flags
> are inherited by the entire kernel?
>
> >
> > I actaully ended up finding the offending code in the md driver I
> > believe that this is a bug in the gcc optimizer but I had no luck
> > creating a small test case and the gcc boys don't like being sent a full
> > kernel as an example of the bug.
> >
> > the offending code was:
> >
> > new_disk--;
> > if (new_disk == disk) {
>
> And this code is drivers/md/raid1.c so adding "-fno-strength-reduce"
> only in this subdirectory should provide a workaround as well. Right?
The downside here is that if there are any "xxx--; if ( xxx == yyy)"
statments in the code these will also misbehave. I have at times seen
some strange crashes with the 2.4.18 kernels I built but I was not sure
if the reason was because of this bug showing its head. I like the
-fno-strength-reduce if it makes the problem go away throughout the
whole kernel.
I have to wonder though if the boys at HP/Compaq/Dec actally tested the
kernel with a raid1 drive set. With my raid1 boot patches my systems did
not even get as far as single user mode without crashing because of this
bug. I get the impression that the bug would also make a regular raid1
non root use would also fail quickly.
> You mean that if you are recompiling only 'raid1.c' code, not
> mentioning 'raid1_read_balance ()' function then this bug is not showing
> up? AFAIK an optimizer in gcc is not crossing file boundaries.
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.
> > and breaks on the test of new_disk in the if statement. by changing the
> > code to
> >
> > new_disk--;
> > md_bugcheck(disk);
> > if (new_disk == disk) {
> >
> > where md_bugcheck does nothing but return caused the optimizer to handle
> > the case differently.
>
> This is not that surprising. 'md_bugcheck' may have side effects
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.
--
Alvin Starr || voice: (416)785-4051
Interlink Connectivity || fax: (416)785-3668
alvin@iplink.net ||
next prev parent reply other threads:[~2002-09-24 17:21 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 [this message]
2002-09-24 17:47 ` Chris Szilagyi
2002-09-24 18:28 ` Michal Jaegermann
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