From: Jan Kiszka <jan.kiszka@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: xenomai-core <xenomai@xenomai.org>
Subject: Re: [Xenomai-core] x86: Endless minor faults
Date: Thu, 02 Jul 2009 09:16:48 +0200 [thread overview]
Message-ID: <4A4C5EE0.6050900@domain.hid> (raw)
In-Reply-To: <4A4C5ADB.5080602@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 1149 bytes --]
Gilles Chanteperdrix wrote:
> Jan Kiszka wrote:
>> On archs with non-atomic switch_mm(), use_mm() will require a different
>> strategy. I'm thinking about something like
>>
>> use_mm():
>> set_some_flag();
>> barrier();
>> current->mm = new_mm;
>> current->active_mm = new_mm;
>> switch_mm(old_active_mm, new_mm, current);
>> clear_some_flag();
>>
>> and switch_mm():
>> ...
>> if (likely(prev != next) || some_flag_set()) {
>> clear_some_flag();
>> ...
>>
>> ie. enforce mm switch if we may have interrupted use_mm at an unpleasant
>> time. I just don't know yet where to attach that some_flag to. Should be
>> the current task, but can we always access it from switch_mm?
>
> These mechanisms are already in place. All you have to do is:
>
> use_mm()
> ipipe_active_mm = NULL;
> barrier();
> current->mm = new_mm;
> current->active_mm = new_mm;
> switch_mm(old_active_mm, new_mm, current);
>
As far as I understand, ipipe_active_mm has different semantics on ARM.
Specifically, it has no relation to the initial "next != prev" check.
The test we need is likely orthogonal to this.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]
next prev parent reply other threads:[~2009-07-02 7:16 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-29 17:35 [Xenomai-core] x86: Endless minor faults Jan Kiszka
2009-06-29 18:09 ` Philippe Gerum
2009-06-29 18:20 ` Jan Kiszka
2009-06-30 8:32 ` Jan Kiszka
2009-06-30 8:36 ` Gilles Chanteperdrix
2009-06-30 8:44 ` Jan Kiszka
2009-06-30 8:42 ` Gilles Chanteperdrix
2009-06-30 8:56 ` Jan Kiszka
2009-06-30 9:20 ` Philippe Gerum
2009-06-30 9:21 ` Gilles Chanteperdrix
2009-06-30 9:25 ` Philippe Gerum
2009-06-30 9:26 ` Gilles Chanteperdrix
2009-06-30 9:27 ` Philippe Gerum
2009-06-30 9:34 ` Gilles Chanteperdrix
2009-06-30 16:11 ` Jan Kiszka
2009-07-01 11:56 ` Jan Kiszka
2009-07-01 12:05 ` Jan Kiszka
2009-07-01 12:24 ` Gilles Chanteperdrix
2009-07-01 12:39 ` Jan Kiszka
2009-07-01 12:41 ` Gilles Chanteperdrix
2009-07-01 12:41 ` Jan Kiszka
2009-07-01 15:51 ` Gilles Chanteperdrix
2009-07-01 16:01 ` Jan Kiszka
2009-07-01 16:04 ` Jan Kiszka
2009-07-01 17:56 ` Jan Kiszka
2009-07-01 18:15 ` Philippe Gerum
2009-07-01 18:27 ` Philippe Gerum
2009-07-01 18:58 ` Jan Kiszka
2009-07-01 19:14 ` Jan Kiszka
2009-07-02 2:05 ` Gilles Chanteperdrix
2009-07-02 6:24 ` Jan Kiszka
2009-07-02 6:59 ` Gilles Chanteperdrix
2009-07-02 7:16 ` Jan Kiszka [this message]
2009-07-02 7:44 ` Gilles Chanteperdrix
2009-07-01 18:56 ` Jan Kiszka
2009-07-02 7:11 ` Philippe Gerum
2009-07-02 17:14 ` Jan Kiszka
2009-07-03 14:54 ` Gilles Chanteperdrix
2009-07-03 15:06 ` Jan Kiszka
2009-07-04 16:39 ` Gilles Chanteperdrix
2009-07-05 12:01 ` Jan Kiszka
2009-07-05 14:56 ` Gilles Chanteperdrix
2009-07-05 17:12 ` Jan Kiszka
2009-07-06 7:54 ` Gilles Chanteperdrix
2009-07-07 18:45 ` 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=4A4C5EE0.6050900@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.