From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Wolfgang Mauerer <wolfgang.mauerer@siemens.com>
Cc: Wolfgang Mauerer <wm@linux-kernel.net>,
Jan Kiszka <jan.kiszka@web.de>,
"xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai] core-3.5 for x86
Date: Wed, 19 Dec 2012 22:06:43 +0100 [thread overview]
Message-ID: <50D22C63.6060800@xenomai.org> (raw)
In-Reply-To: <50D084A7.8080508@siemens.com>
On 12/18/2012 03:58 PM, Wolfgang Mauerer wrote:
> On 18/12/12 15:47, Gilles Chanteperdrix wrote:
>> On 12/18/2012 12:23 PM, Jan Kiszka wrote:
>>> On 2012-12-15 20:16, Gilles Chanteperdrix wrote:
>>>> On 12/15/2012 11:03 PM, Wolfgang Mauerer wrote:
>>>>
>>>>> Hi Gilles,
>>>>>
>>>>> On 15/12/2012 22:24, Gilles Chanteperdrix wrote:
>>>>>
>>>>>> I see some (recent) activity on this git repository:
>>>>>> https://github.com/siemens/ipipe/commits/core-3.5_for-upstream
>>>>>>
>>>>>> In what state is this branch, can I pull from it?
>>>>> please don't pull yet, I need to port a few more patches forward
>>>>> and fix one known issue with the tree. But I'll try to send a
>>>>> pull/discussion request next week.
>>>>>
>>>>>> At least the changes allowing preempt_disable()/preempt_enable() to be
>>>>>> called from non-root context look dubious.
>>>>> are you referring to 767f0d43fe3? This one still carries a TODO
>>>>> item in the description to remind me to check with which
>>>>> non-x86 archs this can cause problems, and what we can do about
>>>>> them.
>>>>
>>>>
>>>> Actually, we already have ipipe_safe_current(), so I guess what you need
>>>> is ipipe_safe_current_thread_info() ?
>>>
>>> That cannot work unless you patch all the ftrace and perf stack - which
>>> would surely not be a good idea /wrt maintainability.
>>>
>>> The point is remove the instrumentation from preempt_disable/enable at
>>> least on those archs that do not need it. And then to look at the archs
>>> that still have stack-based thread_info, if we cannot change this, at
>>> least for CONFIG_IPIPE enabled.
> are you talking about moving the arch's thread_info away from the stack
> to some per-processor area like x86's PDA? At a first glance, that
> sounds more invasive than changing preempt_xyz() in perf and ftrace
> to me, especially since the changes to perf/ftrace should be fairly
> straightforward -- just replace calls to preempt_xyz with calls
> to preempt_xyz_save() based on ipipe_safe_current_thread_info().
>
> The easiest thing is to simply say that perf and ftrace are not
> supported on archs that cannot reliably read thread_info from non-root
> context, but that does not seem very attractive to me.
What I am talking about is:
- defining preempt_disable/preempt_enable to be
ipipe_safe_preempt_disable/ipipe_safe_preempt_enable when CONFIG_FTRACE
or CONFIG_PERF is on
- for x86_64 (because even on x86_32, preempt_enable/disable use the
stack pointer) definee ipipe_safe_preempt_disable/enable to be normal
versions
Now, if you think the implementation of
ipipe_safe_preempt_disable/enable I propose for non x86 architectures is
not what should be done, then do not define anything and generate a
#error when ipipe_safe_preempt_disable/enable are not defined (and
ftrace or perf are on).
>>
>> The problem is the "then", we can not stay with a solution which works
>> only for x86_64. The current contents of the github tree which disables
>> the ipipe_root_context check on all architectures can not be merged as is.
>
> sure, the tree cannot be merged as is. That's why I asked for some more
> time ;)
The thing is, I would like to release before next week-end... I know I
have waited many monthes, but this has to take place at some point...
--
Gilles.
next prev parent reply other threads:[~2012-12-19 21:06 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <50CCEA7E.1080000__518.307140055363$1355606686$gmane$org@xenomai.org>
2012-12-15 22:03 ` [Xenomai] core-3.5 for x86 Wolfgang Mauerer
2012-12-15 22:07 ` Gilles Chanteperdrix
2012-12-15 22:16 ` Gilles Chanteperdrix
2012-12-17 16:08 ` Wolfgang Mauerer
2012-12-17 19:12 ` Gilles Chanteperdrix
2012-12-18 11:23 ` Jan Kiszka
2012-12-18 14:47 ` Gilles Chanteperdrix
2012-12-18 14:58 ` Wolfgang Mauerer
2012-12-19 21:06 ` Gilles Chanteperdrix [this message]
2012-12-20 16:22 ` Wolfgang Mauerer
2012-12-20 16:25 ` Gilles Chanteperdrix
2012-12-20 16:34 ` Wolfgang Mauerer
2012-12-21 0:28 ` Gilles Chanteperdrix
2012-12-21 9:08 ` Wolfgang Mauerer
2012-12-15 21:24 Gilles Chanteperdrix
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=50D22C63.6060800@xenomai.org \
--to=gilles.chanteperdrix@xenomai.org \
--cc=jan.kiszka@web.de \
--cc=wm@linux-kernel.net \
--cc=wolfgang.mauerer@siemens.com \
--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.