All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonas Buchli <jonas@domain.hid>
To: Wolfgang Denk <wd@domain.hid>
Cc: Peter Pastor <pastor@domain.hid>, xenomai@xenomai.org
Subject: Re: [Xenomai-help] bring down the system
Date: Tue, 03 Nov 2009 23:21:20 -0800	[thread overview]
Message-ID: <4AF12B70.3020004@domain.hid> (raw)
In-Reply-To: <20091104065257.A164B3F6C1@domain.hid>

wolfgang,

did you compile with exactly our compile statement or with additional 
flags (i.e. optimization)?

compiling with our statement, just throwing in the -S flag, i am getting 
a very getting different assembly code - while has been a while i have 
been reading assembly, it seems our loop is not getting optimized away.

anyway, the point here is not about if this is a meaningful program or 
not, but we are getting system lock ups and this one is a minimal 
program that does reproduce the problem for us.

best
jonas

Wolfgang Denk wrote:
> Dear Stefan Schaal,
> 
> In message <C790DE41-A093-46C5-9F44-D3F0EA839CF5@domain.hid> you wrote:
>> Sorry, I attached the wrong C-program in the previous posting ....  
>> here is the corrected version:
> 
> I'm not sure what exactly you are trying to test, but I think you
> should invest a little more time in your test cases.
> 
>>   attached is a little C program that spawns off a task which runs a  
>> heavy tiny math job. Despite my 8 processor machine, taking this one  
> 
> Does it? Not for me.
> 
>> void
>> run_task(void *dummy)
>> {
>>    int i;
>>    double foo = 1.0;
>>
>>    for (i=1; i<=100000000; ++i)
>>      foo = foo*1.1;
>>
>>    return;
>> }
> 
> On x86, this code compiles for me into this:
> 
>         .text
>         .p2align 4,,15
> .globl run_task
>         .type   run_task, @function
> run_task:
>         pushl   %ebp
>         movl    %esp, %ebp
>         popl    %ebp
>         ret
>         .size   run_task, .-run_task
>         .ident  "GCC: (GNU) 4.4.1 20090725 (Red Hat 4.4.1-2)"
>         .section        .note.GNU-stack,"",@progbits
> 
> Similar on ARM and Power.
> 
> As you can see, the compiler completely optimizes away your "tiny math
> job". So what should be loading your CPU?
> 
> Best regards,
> 
> Wolfgang Denk
> 

-- 
--------------------------------------------------------------
Jonas Buchli, Dr.sc., MSc EE
Computational Learning and Motor Control Lab
University of Southern California
http://www-clmc.usc.edu/
+1 (213) 740 67 17
--------------------------------------------------------------


  parent reply	other threads:[~2009-11-04  7:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-04  1:18 [Xenomai-help] bring down the system Stefan Schaal
2009-11-04  6:35 ` Stefan Schaal
2009-11-04  6:52   ` Wolfgang Denk
2009-11-04  7:11     ` Stefan Schaal
2009-11-04  7:21     ` Jonas Buchli [this message]
2009-11-04  7:26       ` Wolfgang Denk
2009-11-04  7:37         ` Jonas Buchli
2009-11-04 10:50   ` Gilles Chanteperdrix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AF12B70.3020004@domain.hid \
    --to=jonas@domain.hid \
    --cc=pastor@domain.hid \
    --cc=wd@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.