All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: "M. Koehrer" <mathias_koehrer@domain.hid>,
	xenomai-core <xenomai@xenomai.org>
Subject: Re: [Xenomai-core] Re: [RFC][PATCH 2/2] global CPU affinity control
Date: Tue, 28 Nov 2006 21:12:46 +0100	[thread overview]
Message-ID: <456C983E.70408@domain.hid> (raw)
In-Reply-To: <456C887D.9040008@domain.hid>

Gilles Chanteperdrix wrote:
> Jan Kiszka wrote:
>> This is version 4 of the /proc/xenomai/affinity feature. It has been
>> rebased on the reworked xnshadow_map code, now applying the default
>> affinity mask in a (hopefully) correct way also on shadow threads.
>>
>> What has been said for the previous patch also applies here: test and
>> comment! Mathias, you asked for this feature, please let us know if it
>> fulfils your requirements.
>>
>> Philippe, you were looking for documentation of this new behaviour.
>> Please let me know where you would like to see this. Surely in the
>> nucleus API, I guess. Anywhere else?
>>
>> Jan
>>
>>
>> ------------------------------------------------------------------------
>> (...)
>> @@ -909,8 +911,8 @@ int xnpod_start_thread(xnthread_t *threa
>>  	if (!testbits(thread->status, XNDORMANT))
>>  		return -EBUSY;
>>  
>> -	if (xnarch_cpus_empty(affinity))
>> -		affinity = XNARCH_CPU_MASK_ALL;
>> +	if (xnarch_cpus_equal(affinity, XNPOD_ALL_CPUS))
>> +		affinity = nkaffinity;
> 
> Should not this be:
> 	if (xnarch_cpus_empty(affinity))
> 		affinity = XNARCH_CPU_MASK_ALL;
> 	xnarch_cpus_and(affinity, affinity, nkaffinity);
> 	if (xnarch_cpus_empty(affinity))
> 		return -EINVAL;
> 
> so that no thread could escape the rule imposed by nkaffinity.
> 

Nope, that's intentional (forgot to repeat this fact, was explained
earlier): Users can always override nkaffinity by their own mask. Only
the "I-don't-care" XNPOD_ALL_CPUS activates this new selection mechanism.

Jan


  reply	other threads:[~2006-11-28 20:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-28 13:51 [Xenomai-core] [RFC][PATCH 2/2] global CPU affinity control Jan Kiszka
2006-11-28 19:05 ` [Xenomai-core] " Gilles Chanteperdrix
2006-11-28 20:12   ` Jan Kiszka [this message]
2006-11-29 10:20     ` Gilles Chanteperdrix
2006-11-29 10:31       ` Jan Kiszka
     [not found] ` <26126961.1164785592715.JavaMail.ngmail@domain.hid>
2006-11-29  8:24   ` Jan Kiszka
2006-11-29 12:48 ` [Xenomai-core] " Jan Kiszka

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=456C983E.70408@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=gilles.chanteperdrix@xenomai.org \
    --cc=mathias_koehrer@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.