From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by listman.redhat.com (Postfix) with ESMTP id B80F1405EF for ; Tue, 24 Sep 2002 13:21:06 -0400 (EDT) Received: (from mail@localhost) by int-mx1.corp.redhat.com (8.11.6/8.11.6) id g8OHL6p22780 for axp-list@listman.redhat.com; Tue, 24 Sep 2002 13:21:06 -0400 Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with SMTP id g8OHL6f22775 for ; Tue, 24 Sep 2002 13:21:06 -0400 Received: from mailserver.iplink.net (IDENT:root@smtp.iplink.net [192.139.81.186]) by mx1.redhat.com (8.11.6/8.11.6) with SMTP id g8OH3Gi30528 for ; Tue, 24 Sep 2002 13:03:16 -0400 Received: from mercutio.iplink.net ([192.139.81.54]:42252 "EHLO iplink.net") by mailserver.iplink.net with ESMTP id ; Tue, 24 Sep 2002 13:20:59 -0400 Message-ID: <3D909F24.492C847@iplink.net> Date: Tue, 24 Sep 2002 13:21:40 -0400 From: alvin X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.19-6.2.7.iplink2 i686) X-Accept-Language: en MIME-Version: 1.0 To: axp-list@redhat.com Subject: Re: problems with md driver (RAID-1) on RH 7.2, DP264 machine -- SOLUTION References: <3D74C55C.BBCBEED2@groupinfo.com> <3D906F6D.5E6D989D@groupinfo.com> <3D907DB5.828F52A1@iplink.net> <20020924104200.A15133@ellpspace.math.ualberta.ca> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0.1 Precedence: bulk Reply-To: axp-list@redhat.com List-Help: List-Post: List-Subscribe: , List-Id: Linux and Red Hat on Alpha processors List-Unsubscribe: , List-Archive: 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 ||