All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Thiago Lima <thiagolims@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Get ready queue
Date: Fri, 17 Jul 2009 14:14:11 +0200	[thread overview]
Message-ID: <1247832851.4228.138.camel@domain.hid> (raw)
In-Reply-To: <6a782b880907170418q6bd4fbe7p6fde0f0c6bae551c@domain.hid>

On Fri, 2009-07-17 at 08:18 -0300, Thiago Lima wrote:
> I am doing an schedulability test of real time processes in Xenomai.
> So that, when a new task is started in system, i need to get all
> threads from system, including the new one and make a test to decide
> if this workset is schedulable.
> 
> I have a linux kernel module with a hook that is called whenever a
> task is started. Besides, i have to apply a patch to xenomai kernel in
> order to allow the hooks calling when a user space task is started.

You are likely using an outdated Xenomai core. 2.4.8 fires the START
callout for userland threads as well.

> 
> My question is: how can i get all ready xenomai tasks ? Because i need
> to get the amount of threads to do this test.
> 

Regarding the Xenomai 2.4 core: include/nucleus/pod.h, follow the readyq
member from the struct xnsched type.

This said, the scheduler innards were heavily rewritten in 2.5, to
provide scheduling classes and more policies than RR+FIFO (e.g. time
partitioning and POSIX sporadic server). So what you would measure for
2.4 may not be relevant with 2.5.

> Sorry for my last email. I have not so much time to write and it was
> vague.
> 
> att,
> 
> Thiago.
> 
> On Wed, Jun 10, 2009 at 4:59 PM, Gilles Chanteperdrix
> <gilles.chanteperdrix@xenomai.org> wrote:
>         Thiago Lima wrote:
>         > Sorry, i didnt understand you answer.
>         
>         
>         The question was vague, so was the answer.
>         
>         > I get the global queue doing this:
>         >
>         > threads = &pod->threadq;    // GLOBAL QUEUE
>         > holder = getheadq(&nkpod->threadq); //HEAD NODE
>         
>         
>         These are internal data, you are not supposed to access them
>         that way.
>         Besides threadq is not the ready queue. And with the recent
>         advent of
>         the scheduler classes, you could not do the same modification
>         for the
>         latest version of Xenomai. In short, it is a bad idea, really.
>         
>         If you explained us what you are trying to do (and not how you
>         are
>         trying to do it), maybe we could help. Chances are that you
>         can do what
>         you do without changing Xenomai core, simply using hooks for
>         instance.
>         
>         --
>                                                    Gilles.
> 
> 
> 
> -- 
> Thiago Lima Silva
> Graduando - Ciência da Computação UFBA
> Registered Linux user #466887
> 
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
-- 
Philippe.




  reply	other threads:[~2009-07-17 12:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-05 20:38 [Xenomai-help] Get ready queue Thiago Lima
2009-06-05 22:09 ` Gilles Chanteperdrix
2009-06-10 19:36   ` Thiago Lima
2009-06-10 19:59     ` Gilles Chanteperdrix
2009-07-17 11:18       ` Thiago Lima
2009-07-17 12:14         ` Philippe Gerum [this message]
2009-07-17 12:18         ` Gilles Chanteperdrix
2009-07-21 18:46           ` Thiago Lima

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=1247832851.4228.138.camel@domain.hid \
    --to=rpm@xenomai.org \
    --cc=thiagolims@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.