From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4FE04695.4020609@grandegger.com> Date: Tue, 19 Jun 2012 11:29:57 +0200 From: Wolfgang Grandegger MIME-Version: 1.0 References: <4FE03797.7000408@grandegger.com> <4FE03955.60108@xenomai.org> <4FE03D17.3040408@grandegger.com> <4FE03D5D.7050806@xenomai.org> <4FE03DE4.5050301@grandegger.com> <4FE040A1.80400@xenomai.org> In-Reply-To: <4FE040A1.80400@xenomai.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai] Sharing memory between rt-posix and standard-posix apps List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gilles Chanteperdrix Cc: Xenomai@xenomai.org On 06/19/2012 11:04 AM, Gilles Chanteperdrix wrote: > On 06/19/2012 10:52 AM, Wolfgang Grandegger wrote: >> On 06/19/2012 10:50 AM, Gilles Chanteperdrix wrote: >>> On 06/19/2012 10:49 AM, Wolfgang Grandegger wrote: >>>> On 06/19/2012 10:33 AM, Gilles Chanteperdrix wrote: >>>>> On 06/19/2012 10:25 AM, Wolfgang Grandegger wrote: >>>>>> Hello, >>>>>> >>>>>> the shared memory support of Xenomai's POSIX skin currently only support >>>>>> shared memory between rt processes. >>>>> >>>>> These services are for sharing memory between user-space and >>>>> kernel-space. In order to share memory between user-space processes, you >>>>> can use plain linux shared memories. >>>> >>>> But then I will get mode switches due to page faults, right? >>> >>> No, there should not be any page fault. >> >> But that's what we observe on a i.MX53 and i.MX6Q board. IIRC, the first >> access usually results in a page fault. > > And you do not get the same behaviour with posix skin shared memories ? Right, and that's because do_pagefault() is called somewhere in the initialization, IIRC. But I will redo my tests now. Anyway, if I use the POSIX skin the shared memory functions in there will be used automatically. But I could use __real_shm_open and __real_mmap, right? ... and access the page once per page in the initialization phase. Then no more page faults should happen. Wolfgang.