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 8DD8B40495 for ; Tue, 24 Sep 2002 13:05:45 -0400 (EDT) Received: (from mail@localhost) by int-mx1.corp.redhat.com (8.11.6/8.11.6) id g8OH5jQ19545 for axp-list@listman.redhat.com; Tue, 24 Sep 2002 13:05:45 -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 g8OH5jf19540 for ; Tue, 24 Sep 2002 13:05:45 -0400 Received: from groupinfo.com (fw.groupinfo.com [35.12.129.3]) by mx1.redhat.com (8.11.6/8.11.6) with SMTP id g8OGlti27499 for ; Tue, 24 Sep 2002 12:47:55 -0400 Received: from groupinfo.com (OMNIDOME.GROUPINFO.COM [192.168.1.136]) by groupinfo.com (8.11.6/8.11.6) with ESMTP id g8OH5cO02163 for ; Tue, 24 Sep 2002 13:05:39 -0400 Message-ID: <3D909B62.8A31E730@groupinfo.com> Date: Tue, 24 Sep 2002 13:05:38 -0400 From: Chris Szilagyi Organization: Group InfoTech X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) 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? 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