[Xenomai-core] [RFC] Fast Context Switch Extension for ARM Linux

2007-09-20 Thread Richard Cochran
I know that this is a bit off topic, yet perhaps some on this list
have interest or knowledge in this area. I am also posting this idea
to the linux-arm-kernel list.

I would like to implement the ARM FCSE under Linux, using the Intel
IXP425 board. Before I start, I would like to ask:

1. Has any work already been done in this area?

2. Is there something about the current Linux MM that would make this
   impractical?

3. Does anyone else have interest in this?

I had once proposed this task as a student project, and so I append
the long project description, below.

Thanks,
Richard

ARM Fast Context Switch Extension for Linux

Motivation

 The ARM v5 CPUs are inexpensive, low power, 32 bit processors widely
 used in embedded systems. However, because of these processors' cache
 implementation, using memory protection on these systems may incur a
 performance penalty that is too great for real time applications. The
 aim of this study is to achieve both memory protection and good cache
 performance under the Linux 2.6 operating system, by implementing
 the Fast Context Switch Extension (FCSE).

Task

 ARM v5 processors access the cache by virtual addresses. As a result,
 the cache is invalidated after a context switch, since no two
 processes share the same address space. Reloading the cache from main
 memory is a very expensive operation.

 One approach to address this problem, used for example in vxWorks or
 uClinux, is to use one flat address space, shared by the operating
 system kernel and all user processes. This avoids the context switch
 penalty while sacrificing memory protection. The obvious drawback
 under this scenario is that any one misbehaving program can corrupt
 the kernel or other programs.

 Another solution, not yet implemented under Linux, is to use the
 Process ID register found on some ARM CPUs, for example the Intel
 IXP425. This register contains a 7 bit process identifier that can be
 combined with a 25 bit virtual address. Using this method allows 128
 distinct 32 MB address spaces, so that up to 128 processes may safely
 co-exist, without paying the context switch penalty. The resulting
 limitation of 128 processes and 32 MB address space is acceptable for
 many embedded systems.

 The tasks of this study would be:

 1. Research and summarize the existing work in this area.

 2. Benchmark the current implementations to demonstrate the problem,
using standard Linux, Xenomai, and the PREEMPT_RT patch set.

 3. Illuminate the Linux memory management subsystem.

 4. Implement FCSE in the Linux memory management subsystem.

 5. Benchmark the result of the improved kernel.

Selected references:

o A short summary of the issue and the approach used by QNX:
  http://www.qnx.com/developers/docs/6.3.0/neutrino/prog/arm_memory.html

o Context Switching and IPC Performance Comparison between uClinux and
  Linux on the ARM9 based Processor
  http://opensrc.sec.samsung.com/document/uc-linux-04_sait.pdf

o Fast Address-Space Switching for ARM Linux Kernels
  http://www.ertos.nicta.com.au/software/fass/

o Context Switch Overheads for Linux on ARM Platforms
  http://choices.cs.uiuc.edu/contextswitching.pdf

___
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core


[Xenomai-core] AT91SAM9260 support

2007-09-20 Thread Claudio Scordino
Hi list,

I'm starting working on the Atmel AT91SAM9260 platform,
and I need Xenomai, of course.

I have a couple of questions:

- Does Xenomai/Adeos 2.3.3 support this platform, or I should use
   Xenomai 2.4-rc1 ?

- I have seen tha Xenomai 2.4-rc1 is against Linux 2.6.20. Did
   anybody already port Xenomai to Linux 2.6.22 (I just need
   the at91 part) ?

Many thanks in advance,

 Claudio

___
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core


Re: [Xenomai-core] AT91SAM9260 support

2007-09-20 Thread Gilles Chanteperdrix
On 9/20/07, Claudio Scordino [EMAIL PROTECTED] wrote:
 Hi list,

 I'm starting working on the Atmel AT91SAM9260 platform,
 and I need Xenomai, of course.

 I have a couple of questions:

 - Does Xenomai/Adeos 2.3.3 support this platform, or I should use
Xenomai 2.4-rc1 ?

Current stable release is Xenomai 2.3.4, using Adeos for arm version
1.7-06, and yes, it supports the AT91SAM926x platforms.


 - I have seen tha Xenomai 2.4-rc1 is against Linux 2.6.20. Did
anybody already port Xenomai to Linux 2.6.22 (I just need
the at91 part) ?

The reason why I did not do the port is that I supposed that Adeos
noarch part for Linux 2.6.22 uses clockevent/clocksource, and
clockevent/clocksource is not implemented for all ARM boards (I mean
all arm boards supported by the Adeos patch), so unless somebody
really needs support for 2.6.22, I am waiting for 2.6.23.

-- 
   Gilles Chanteperdrix

___
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core