Bug in haifa scheduler ?

Franz Sirl Franz.Sirl-kernel@lauterbach.com
Fri Jun 26 02:51:00 GMT 1998


At 22:32 25.06.98 , Gabriel Paubert wrote:
>
>
>On Thu, 25 Jun 1998, Franz Sirl wrote:
>
>> ;-). You would have noticed a failing test compile/980511-1.c, which is a
>> stripped down super.c.
>
>I tried once to run the testsuite. There is too much output. 
>
>> This will (hopefully!) be fixed for 1.1. For now simply add the following
>> lines at the top of fs/Makefile:
>> 
>> CFLAGS_super.o += -fno-expensive-optimizations
>> CFLAGS_namei.o += -fno-expensive-optimizations
>> 
>> The namei change makes mknod working. Additionally I would recommend the
>
>Strange, it seems I never need mknod ! Been using the machine for a while
>without noticing any problem. 

Usually happens to people who upgrade from 2.1.24 and don't have the new
major/minors for clock/adb/etc. yet.

>> following patch for io.h:
>> 
>> Index: io.h
>> ===================================================================
>> RCS file: /cvsroot/linux/include/asm-ppc/io.h,v
>> retrieving revision 1.29
>> diff -u -r1.29 io.h
>> --- io.h        1998/06/23 20:06:13     1.29
>> +++ io.h        1998/06/23 23:15:44
>> @@ -202,7 +202,7 @@
>>   */
>>  extern inline void eieio(void)
>>  {
>> -       asm volatile ("eieio" : :);
>> +       __asm__ __volatile__ ("eieio" : : : "memory" );
>>  }
>>  
>>  /*
>> 
>> 
>> Hope this helps,
>
>
>What worries me is that a memory clobber effectively disables many 
>optimizations. All I/O macros use pointers to volatile or volatile
>asm statements, and I thouht that these would already prevent the compiler
>from  reordering but allow it to keep values in register across the
>I/O access. 

I'm still not sure if this is a compiler bug or a bug in the kernel. The
documentation for "asm volatile" in my understanding states that it can be
reordered in a block (but what is a block here?), so I tried to give the
compiler more hints for reordering (effectively it _is_ clobbering memory)
and suddenly it worked. I also didn't see any significant change in the
generated code, so I thought bettter save than sorry ;-). The file in
question is platinum.c, without this change you'll get the famous "striped
display".

Franz.




More information about the Gcc-bugs mailing list