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 DA6063EA77 for ; Tue, 24 Sep 2002 14:28:55 -0400 (EDT) Received: (from mail@localhost) by int-mx1.corp.redhat.com (8.11.6/8.11.6) id g8OIStJ12646 for axp-list@listman.redhat.com; Tue, 24 Sep 2002 14:28:55 -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 g8OIStf12642 for ; Tue, 24 Sep 2002 14:28:55 -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 g8OIB5i18759 for ; Tue, 24 Sep 2002 14:11:05 -0400 Received: (from michal@localhost) by ellpspace.math.ualberta.ca (8.11.6/8.11.6) id g8OISlg15824 for axp-list@redhat.com; Tue, 24 Sep 2002 12:28:47 -0600 Date: Tue, 24 Sep 2002 12:28:47 -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: <20020924122847.A15598@ellpspace.math.ualberta.ca> References: <3D74C55C.BBCBEED2@groupinfo.com> <3D906F6D.5E6D989D@groupinfo.com> <3D907DB5.828F52A1@iplink.net> <20020924104200.A15133@ellpspace.math.ualberta.ca> <3D909F24.492C847@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: <3D909F24.492C847@iplink.net>; from alvin@iplink.net on Tue, Sep 24, 2002 at 01:21:40PM -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 01:21:40PM -0400, alvin wrote: > > 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. My point was that from what you are writing, contrary to what you said, you had on hands a much smaller test case than the whole kernel. I do not know how far it could be cut-down, as some bugs only do show in a suitable context, but a size would be reasonable. > > This is not that surprising. 'md_bugcheck' may have side effects I meant "as far as optimizer knows" if that was not clear. > 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. So once again you see that optimization is not crossing "compilation unit" boundaries. :-) Instead of a dummy function making some variables 'volatile' would likely be enough to "cheat" an optimizer into a workaround. A simpler one would be to adjust optimization for this particular file. Mind you - this is not a fix by any means, only a hack to cover compiler bugs, but from what George wrote the issue is known and people are working on a fix. This is what is important here. Michal p.s. The other current optimizer bug I know of and which shows in a kernel compilation, but which does not have such drastic effects, is that if you will try to recompile on Alpha an ov511 for USB then with default optimizations this will trigger an internal compiler bug and you will end up with a segfault. Any other optimization level but -O2 is ok provided your CPU type is set to ev4. A workaround is not to change optimization flags for the whole kernel but to use "EXTRA_CFLAGS := -O3 -mcpu=ev4" for that one particular file. I have no idea if this module actually works on Alpha but that way at least it compiles without incidents. :-) Skipping that in a "custom" kernel would work as well but not when you really want to use that module.