From: Jan Kiszka <jan.kiszka@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] [PATCH 1/6] Handle priority changes of SCHED_RR tasks
Date: Mon, 15 Dec 2008 15:54:12 +0100 [thread overview]
Message-ID: <49466F94.8010906@domain.hid> (raw)
In-Reply-To: <49466D35.9020705@domain.hid>
Gilles Chanteperdrix wrote:
> Jan Kiszka wrote:
>> If shadowed Linux tasks with SCHED_RR policy change their priority,
>> do_setsched_event currenty ignores this. Extend the condition to catch
>> this case as well.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@domain.hid>
>> ---
>>
>> ksrc/nucleus/shadow.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/ksrc/nucleus/shadow.c b/ksrc/nucleus/shadow.c
>> index bd3bb3d..9f81c32 100644
>> --- a/ksrc/nucleus/shadow.c
>> +++ b/ksrc/nucleus/shadow.c
>> @@ -2312,7 +2312,7 @@ static inline void do_setsched_event(struct task_struct *p, int priority)
>> union xnsched_policy_param param;
>> struct xnsched *sched;
>>
>> - if (!thread || p->policy != SCHED_FIFO)
>> + if (!thread || (p->policy != SCHED_FIFO && p->policy != SCHED_RR))
>> return;
>
> After some thinking about it, I think this is the wrong way to go. When
> the user-space requests SCHED_RR, only the shadow should use SCHED_RR,
> the linux thread should keep using SCHED_FIFO. We do not want two
> schedulers to do round-robin, this would result in unpredictable behaviour.
Well, passing SCHED_FIFO instead of SCHED_RR to glibc is one thing. But
as you can't enforce this mapping anyway, I don't think it is wrong to
accept also prio changes of SCHED_RR shadow threads.
Jan
--
Siemens AG, Corporate Technology, CT SE 26
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2008-12-15 14:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-15 14:34 [Xenomai-core] [PATCH 0/6] Various fixes and cleanups Jan Kiszka
2008-12-15 14:34 ` [Xenomai-core] [PATCH 5/6] Replace --without-__tread with --enable-dlopen-skins Jan Kiszka
2008-12-15 14:34 ` [Xenomai-core] [PATCH 3/6] POSIX: Optimize pthread_setschedparam fast path Jan Kiszka
2008-12-15 14:46 ` Gilles Chanteperdrix
2008-12-15 14:50 ` Jan Kiszka
2008-12-15 15:01 ` Gilles Chanteperdrix
2008-12-15 15:08 ` Jan Kiszka
2008-12-15 14:34 ` [Xenomai-core] [PATCH 6/6] POSIX: Do not auto-shadow main with dlopen enabled Jan Kiszka
2008-12-15 14:34 ` [Xenomai-core] [PATCH 1/6] Handle priority changes of SCHED_RR tasks Jan Kiszka
2008-12-15 14:44 ` Gilles Chanteperdrix
2008-12-15 14:54 ` Jan Kiszka [this message]
2008-12-15 14:34 ` [Xenomai-core] [PATCH 4/6] Mark libs nodlopen on initial-exec TLS Jan Kiszka
2008-12-15 14:34 ` [Xenomai-core] [PATCH 2/6] POSIX: Fix initialization of SCHED_RR threads Jan Kiszka
2008-12-15 16:25 ` [Xenomai-core] [PATCH 0/6] Various fixes and cleanups Philippe Gerum
2008-12-15 16:34 ` Jan Kiszka
2008-12-15 16:50 ` 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=49466F94.8010906@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.