All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Peter Pastor <peter.pastor@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] detect mode switches to primary mode
Date: Sat, 06 Nov 2010 20:48:34 +0100	[thread overview]
Message-ID: <4CD5B112.8040904@domain.hid> (raw)
In-Reply-To: <AANLkTikjovoR71pGkAOasVOENj4SiZ4hLYpSidvVxm06@domain.hid>

Peter Pastor wrote:
> Hey Gilles,
> 
>>> There is no such thing as unwanted mode switches from secondary mode
> to primary mode.
> Really ?? I want to ensure that my boarder line thread runs in SECONDARY
> mode except when it is accessing the shared memory. The reason for that
> is that I want linux to be able to preempt that thread if necessary. I
> have enabled the Xenomai watchdog to kill real-time threads when they
> starve the linux kernel. Thus, the result is that this watchdog kills
> (or sometimes only preempts?) my boarder line thread (preempting is OK,
> but killing is NOT). I see that the watchdog kicked in in the logs
> (dmesg). This happens roughly every 5-10min or so... My idea is, that if
> I force the thread to run in secondary mode (after accessing the shared
> memory), it will be a regular linux thread (and can be preempted). Thus,
> having it switch to primary mode is unwanted, is it ?
> 
> What am I missing here ?

If the watchdog kills a thread, it means that the thread has an infinite
loop. The bug is this infinite loop, not the fact that the thread is
running in primary mode. You can install a handler for the watchdog
signal to see where the infinite loop is.

-- 
                                                                Gilles.


      reply	other threads:[~2010-11-06 19:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-06  2:26 [Xenomai-help] detect mode switches to primary mode Peter Pastor
2010-11-06 13:51 ` Gilles Chanteperdrix
     [not found]   ` <AANLkTimhUUYDkHh6wJ_zL8dLJgCi+7F8kOXrA63LzTO9@domain.hid>
2010-11-06 15:34     ` Gilles Chanteperdrix
2010-11-06 16:08     ` Gilles Chanteperdrix
2010-11-06 17:03   ` Peter Pastor
2010-11-06 18:20     ` Gilles Chanteperdrix
2010-11-06 19:43       ` Peter Pastor
2010-11-06 19:48         ` Gilles Chanteperdrix [this message]

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=4CD5B112.8040904@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=peter.pastor@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.