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 1095B3FD3B for ; Tue, 24 Sep 2002 12:42:08 -0400 (EDT) Received: (from mail@localhost) by int-mx1.corp.redhat.com (8.11.6/8.11.6) id g8OGg7R13177 for axp-list@listman.redhat.com; Tue, 24 Sep 2002 12:42:07 -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 g8OGg7f13173 for ; Tue, 24 Sep 2002 12:42:07 -0400 Received: from ellpspace.math.ualberta.ca (ellpspace.math.ualberta.ca [129.128.207.67]) by mx1.redhat.com (8.11.6/8.11.6) with SMTP id g8OGOIi21231 for ; Tue, 24 Sep 2002 12:24:18 -0400 Received: (from michal@localhost) by ellpspace.math.ualberta.ca (8.11.6/8.11.6) id g8OGg0t15277 for axp-list@redhat.com; Tue, 24 Sep 2002 10:42:00 -0600 Date: Tue, 24 Sep 2002 10:42:00 -0600 From: Michal Jaegermann To: axp-list@redhat.com Subject: Re: problems with md driver (RAID-1) on RH 7.2, DP264 machine -- SOLUTION Message-ID: <20020924104200.A15133@ellpspace.math.ualberta.ca> References: <3D74C55C.BBCBEED2@groupinfo.com> <3D906F6D.5E6D989D@groupinfo.com> <3D907DB5.828F52A1@iplink.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <3D907DB5.828F52A1@iplink.net>; from alvin@iplink.net on Tue, Sep 24, 2002 at 10:59:01AM -0400 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: 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? 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