From: Jan Kiszka <jan.kiszka@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: xenomai-core <xenomai@xenomai.org>
Subject: Re: [Xenomai-core] Using SIGWINCH to trigger priority change.
Date: Sun, 12 Oct 2008 17:36:57 +0200 [thread overview]
Message-ID: <48F21999.1060508@domain.hid> (raw)
In-Reply-To: <48F2118A.7010608@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 1820 bytes --]
Gilles Chanteperdrix wrote:
> Hi,
>
> I am working on using SIGWINCH to trigger priority changes in
> user-space. And I am afraid it will never really work:
> - Xenomai makes a difference between the base priority of a thread and
> its current priority. But pthread_getschedparam should return the base
> priority, not the current priority, so, we need a way to change the
> current priority of a thread without changing its base priority.
> - I do not know at what time we should trigger a signal to the thread
> whose priority is changing:
> . if we send it as soon as we return to user-space (at the same time
> as when we handle LO_RENICE_REQ), if the thread whose priority is
> changing is not the current one, we potentially trigger a
> primary/secondary mode transition for this thread;
> . if we wait for the target thread to return to secondary mode (via
> xnshadow_relax), any other thread in the same process which would read
> the target thread priority with pthread_getschedparam would not see that
> the priority has changed;
> . we could do it as soon as a thread of the same process returns to
> secondary mode, but it looks complicated, and besides,
> pthread_getschedparam can safely be called from primary mode, so we
> still have the same issue as for the previous point.
>
> This is where I stopped thinking about this idea.
It would be nice to have pthread_getschedparam always in sync with the
shadow base prio. But if this is obviously at least very complicated (if
not infeasible), I would focus on getting the base prio right when the
thread switches to secondary mode (or if it already is there, of
course). That we cannot guarantee pthread_getschedparam returning the
same value that rt_task_set_priority applied should simply be documented.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]
next prev parent reply other threads:[~2008-10-12 15:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-12 15:02 [Xenomai-core] Using SIGWINCH to trigger priority change Gilles Chanteperdrix
2008-10-12 15:36 ` Jan Kiszka [this message]
2008-10-13 12:54 ` Philippe Gerum
2008-10-13 13:00 ` Gilles Chanteperdrix
2008-10-13 13:44 ` Philippe Gerum
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=48F21999.1060508@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=gilles.chanteperdrix@xenomai.org \
--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.