All of lore.kernel.org
 help / color / mirror / Atom feed
From: "M. Koehrer" <mathias_koehrer@domain.hid>
To: xenomai@xenomai.org
Subject: [Xenomai-help] RT Application on isolated core
Date: Wed, 4 Jun 2008 11:08:49 +0200 (CEST)	[thread overview]
Message-ID: <14864600.1212570529651.JavaMail.ngmail@domain.hid> (raw)

Hi!

I am doing some experiments on a Core2Duo CPU and I have some question on it.
My setup is the following:
I have Xenomai 2.3.3 and kernel 2.6.20.4, SMP enabled.
I start the kernel with the option isolcpus=1 which works as all linux tasks run on
CPU 0 (i.e. core 0).
Now, I start a very small Xenomai (native skin) application with on real time task 
on CPU 1 (core 1). 
This application realizes an endless loop that does some dummy math operations 
(to burn CPU power...).
I am connected remotely to the PC (via telnet, no X available).
When I start the real time application I can work on a second telnet session for a while.
However, after a couple of seconds, the PC seems to freeze as I am no longer able 
to work via telnet. I have to reset the PC to continue.

My question is now: What is happening here? This real time application is the only one to
run on CPU 1, however there still seems to be a dependency to CPU 0.
When I place a rt_task_sleep() within the loop, everything is fine.

Thanks for all ideas on this.

Regards

Mathias

########## Start of Demo Application ################
#include <stdio.h>
#include <sys/mman.h>
#include <native/task.h>
#include <math.h>

RT_TASK task_desc;

volatile double d;
void mytask(void *cookie)
{
    int i;
    for (i=0; i< 10000; i++)
    {
        int j;
        for (j=0; j<10000000; j++)
        {
            d = d + 1.32 * j * sin(j+123.2 + i * 121.2);
        }
        // Uncomment this to avoid freeze:
        // rt_task_sleep(10000);
    }
}
int main(void)
{
    mlockall(MCL_CURRENT|MCL_FUTURE);
    rt_task_spawn(&task_desc, "mytask", 0, 81, T_JOINABLE | T_FPU | T_CPU(1), &mytask, NULL);
    rt_task_join(&task_desc);
    printf("End\n");
    return 0;
}
########## End of Demo Application ################



-- 
Mathias Koehrer
mathias_koehrer@domain.hid


Jetzt komfortabel bei Arcor-Digital TV einsteigen: Mehr Happy Ends, mehr Herzschmerz, mehr Fernsehen! Erleben Sie 50 digitale TV Programme und optional 60 Pay TV Sender, einen elektronischen Programmführer mit Movie Star Bewertungen von TV Movie. Außerdem, aktuelle Filmhits und spannende Dokus in der Arcor-Videothek. Infos unter www.arcor.de/tv


             reply	other threads:[~2008-06-04  9:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-04  9:08 M. Koehrer [this message]
2008-06-04 21:57 ` [Xenomai-help] RT Application on isolated core Jan Kiszka

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=14864600.1212570529651.JavaMail.ngmail@domain.hid \
    --to=mathias_koehrer@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.