Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Chris Szilagyi <chris@groupinfo.com>
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:05:38 -0400	[thread overview]
Message-ID: <3D909B62.8A31E730@groupinfo.com> (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?

These flags are inherited and are used on 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?
>
> 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.
>
> > 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
>
>   Michal




  reply	other threads:[~2002-09-24 17:05 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 [this message]
2002-09-24 17:21       ` alvin
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