From: Jan Kiszka <jan.kiszka@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: Xenomai-core@domain.hid
Subject: Re: [Xenomai-core] [RFC][PATCH] Enforce nkaffinity unconditionally
Date: Wed, 17 Oct 2007 18:40:00 +0200 [thread overview]
Message-ID: <47163AE0.8040106@domain.hid> (raw)
In-Reply-To: <2ff1a98a0710161040n772fb76cv86d69312c4b853b2@domain.hid>
Gilles Chanteperdrix wrote:
> On 10/16/07, Jan Kiszka <jan.kiszka@domain.hid> wrote:
>> Hi,
>>
>> after looking at the reason for the nkaffinity-vs.-POSIX issue [1]
>> again, I came to the conclusion that there is no way to apply the
>> current global affinity scheme on the POSIX skin. This scheme goes like
>> this:
>> - If the user provides whatever thread affinity _explicitly_, use this
>> one.
>> - If the user doesn't do so, apply the global nkaffinity.
>>
>> In kernel space, is is simple to differentiate between both cases,
>> because all affinity fiddling for all skins go through Xenomai's hands.
>> But for the user space POSIX skin, we rely on the task affinity that is
>> set using standard Linux services, and that one has no "dirty-bit" to
>> tell both scenarios apart.
>>
>> So my conclusion is that we should rather apply the nkaffinity always,
>> ie. logically AND it with the desired (or default) affinity. The
>> system's default behaviour will still be the same compared to earlier
>> Xenomai versions, as nkaffinity is ALL_CPUS by default. I also think
>> this behaviour is easier to understand for the user than the current
>> approach.
>>
>> Any concerns about the (yet untested) attached patch?
>
> Well... Thanks for working in my stead. I had a look a the posix
> situation but could not find the place in the code where the affinity
> was set for user-space posix threads.
>
> But when looking at the way nkaffinity worked, I wondered why it was
> not set globally with a cpus_and on the tasks affinity. So, I
> basically agree with your patch (if it does what I think it does).
Tested, and I can confirm it works as it should do. Philippe, please apply.
Jan
--
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2007-10-17 16:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-16 17:31 [Xenomai-core] [RFC][PATCH] Enforce nkaffinity unconditionally Jan Kiszka
2007-10-16 17:40 ` Gilles Chanteperdrix
2007-10-17 16:40 ` Jan Kiszka [this message]
2007-10-17 17:29 ` 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=47163AE0.8040106@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=Xenomai-core@domain.hid \
--cc=gilles.chanteperdrix@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.