From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Content-Type: multipart/alternative; boundary="_bc3e43f0-0b01-4117-8930-4f77757915b9_" From: krishna m Date: Tue, 5 Apr 2011 19:18:44 +0530 MIME-Version: 1.0 Subject: [Xenomai-core] Tiny Core Linux + xenomai/RTAI List-Id: Xenomai life and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: xenomai@xenomai.org, rtai@domain.hid --_bc3e43f0-0b01-4117-8930-4f77757915b9_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Has anyone tried applying Xenomai or RTAI patch to the tiny core Linux? Wil= l it give a better performance compared to the plain vanilla Linux because = the kernel footprint is small? = --_bc3e43f0-0b01-4117-8930-4f77757915b9_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Has= anyone tried applying Xenomai or RTAI patch to the tiny core Linux? Will i= t give a better performance compared to the plain vanilla Linux because the= kernel footprint is small?
= --_bc3e43f0-0b01-4117-8930-4f77757915b9_-- From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4D9B33BA.5060807@domain.hid> Date: Tue, 05 Apr 2011 17:22:34 +0200 From: Gilles Chanteperdrix MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai-core] Tiny Core Linux + xenomai/RTAI List-Id: Xenomai life and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: krishna m Cc: xenomai@xenomai.org krishna m wrote: > Has anyone tried applying Xenomai or RTAI patch to the tiny core > Linux? Will it give a better performance compared to the plain > vanilla Linux because the kernel footprint is small? Let us make this clear, since apparently people still seem to wonder: Xenomai only relies on the Linux kernel and the C library you use, it does not care about any distribution. Whether tiny core, Ubuntu, Fedora, Debian, Slackware, gentoo, it does not matter. And since you still have not understood either, a reminder: the Xenomai mailing lists are an old fashioned RFC 1855 plain text, 72 columns, bottom posting, mailing list. So, please no HTML, no multipart/alternative, no head-twisting long lines. And no cross-posting with RTAI mailing list, most people are not subscribed to the two lists, so will get mailer daemon errors when posting to the mailing list they are not subscribed to. -- Gilles. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Berger Date: Tue, 05 Apr 2011 17:51:52 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit In-Reply-To: Subject: Re: [Xenomai-core] Tiny Core Linux + xenomai/RTAI Reply-To: gmane@domain.hid List-Id: Xenomai life and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: xenomai@xenomai.org Cc: rtai@domain.hid Hi Krishna, On 04/05/2011 04:48 PM, krishna m wrote: > Has anyone tried applying Xenomai or RTAI patch to the tiny core Linux? No > Will it give a better performance compared to the plain vanilla Linux > because the kernel footprint is small? I guess the Linux Kernel is pretty much the same with the vanilla kernel. The reason it might offer better performance does most likely not come from the kernel, but because in such a small system less services are running, which might eat less CPU time. Will performance be better? Depends on what you mean with performance. If you apply Xenomai/RTAI to a vanilla Linux kernel throughput and number crunching (performance) will get worse and determinism will get better. Real-time is not about "performance" (speed, throughput), but about determinism and those are conflicting requirements. You can have a look at an article of mine for a more detailed explanation of what I mean: http://www.eetimes.com/design/embedded/4204740/Getting-real--time--about-embedded-GNU-Linux Regards, Robert > > > > _______________________________________________ > Rtai mailing list > Rtai@domain.hid > https://mail.rtai.org/cgi-bin/mailman/listinfo/rtai ...A clever person solves a problem.A wise person avoids it.- Einstein My public pgp key is available at: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x90320BF1 From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4D9B4EC0.5080701@domain.hid> Date: Tue, 05 Apr 2011 19:17:52 +0200 From: Gilles Chanteperdrix MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai-core] Tiny Core Linux + xenomai/RTAI List-Id: Xenomai life and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: gmane@domain.hid Cc: xenomai@xenomai.org Robert Berger wrote: > Hi Krishna, > > On 04/05/2011 04:48 PM, krishna m wrote: >> Has anyone tried applying Xenomai or RTAI patch to the tiny core Linux? > > No > >> Will it give a better performance compared to the plain vanilla Linux >> because the kernel footprint is small? > > I guess the Linux Kernel is pretty much the same with the vanilla > kernel. The reason it might offer better performance does most likely > not come from the kernel, but because in such a small system less > services are running, which might eat less CPU time. > > Will performance be better? > > Depends on what you mean with performance. > > If you apply Xenomai/RTAI to a vanilla Linux kernel throughput and > number crunching (performance) will get worse and determinism will get > better. > > Real-time is not about "performance" (speed, throughput), but about > determinism and those are conflicting requirements. > > You can have a look at an article of mine for a more detailed > explanation of what I mean: > http://www.eetimes.com/design/embedded/4204740/Getting-real--time--about-embedded-GNU-Linux Ok, we are on Xenomai-core, so, let us discuss. If we admit that the OP is indeed talking about latencies (a quantifiable measure of determinism), suggesting that the effect on cache of the Linux kernel might influence the latencies is not completely irrelevant: the benchmark we make with Xenomai tend to consistently show that cache thrashing by the Linux kernel has an effect on latencies. Also, having shorter latencies means that we cover a larger range of user-application needs. So, we try to have short latencies. -- Gilles. From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: From: krishna m Date: Wed, 6 Apr 2011 22:27:27 +0530 In-Reply-To: <4D9B69A4.7050902@domain.hid> References: <4D9B4EC0.5080701@domain.hid>, , <4D9B69A4.7050902@domain.hid> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [Xenomai-core] Tiny Core Linux + xenomai/RTAI List-Id: Xenomai life and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: gilles.chanteperdrix@xenomai.org, gmane@domain.hid Cc: xenomai@xenomai.org ---------------------------------------- > Date: Tue=2C 5 Apr 2011 21:12:36 +0200 > From: gilles.chanteperdrix@xenomai.org > To: gmane@domain.hid > CC: xenomai@xenomai.org > Subject: Re: [Xenomai-core] Tiny Core Linux + xenomai/RTAI > > Robert Berger wrote: > > Hi Gilles=2C > > > > On 04/05/2011 08:17 PM=2C Gilles Chanteperdrix wrote: > >> Ok=2C we are on Xenomai-core=2C so=2C let us discuss. If we admit that= the OP > >> is indeed talking about latencies (a quantifiable measure of > >> determinism)=2C suggesting that the effect on cache of the Linux kerne= l > >> might influence the latencies is not completely irrelevant: the > >> benchmark we make with Xenomai tend to consistently show that cache > >> thrashing by the Linux kernel has an effect on latencies. > > > > Yes this did not immediately come into my mind. Linux cache thrashing > > affects latencies of threads running under Xenomai (user and/or kernel > > space)=2C but as you point out ( > > http://permalink.gmane.org/gmane.linux.real-time.xenomai.devel/8167 ) > > that is distro independent. > > Yes=2C and I completely agree with your answer=2C I was just replying for > the sake of completeness. Thanks for replying. I got to read important points that affect the perform= ance=20 of a realtime system. I was indeed talking about the determinism of the RTO= S=20 when i referred to the performance. I am right now looking at interrupt=20 determinism=2C task switch latency and jitter performance of the RTOS [Xenomai in this case]on x86 platform. Since there is no Cache locking=20 mechanism on x86. i wanted to know if a smaller footprint kernel would=20 improve the performance of the above mentioned parameters of RTOS.=20 =20 > > > > > I know that the answer to this question might not be trivial=2C but wha= t > > would you suggest could be done to minimize cache thrashing? > > If we are talking embedded systems=2C you have control over the non > real-time activities you run=2C you can try and be greedy in the way they > use cache (I am not sure anyone really does that=2C I=2C for one=2C tried= and > optimize a toy application for cache usage to see that the effect is > impressive). > > The other way=2C is not to minimize cache thrashing=2C but to minimize it= s > effect on latencies. You can do that by increasing the frequency of the > "critical" real-time task. By increasing its frequency=2C you make it mor= e > likely to remain in cache=2C and so decrease its latency. This is why=2C = for > instance=2C on most (*) platforms you get a better latency with smaller > periods. > > On some embedded platforms=2C you also have the choice to lock some cache > lines=2C or move some data or code to some fast memory essentially as fas= t > as cache (TCMs or SRAMs on ARM). This is a promising solution=2C at least > on ARM=2C where many SOCs have such special memory=2C but as far as I kno= w=2C > nobody tried yet and reported success of failure. > > (*) the exception being armv4 or armv5 without the FCSE extension=2C wher= e > the cache is flushed all the time anyway. > > > > >> Also=2C having shorter latencies means that we cover a larger range of > >> user-application needs. So=2C we try to have short latencies. > >> > > > > Whoever wants to see Xenomai latencies in action can compile cyclictest > > with and without Xenomai and see the differences. On the platforms I've > > tried so far the differences are clearly visible=3B) > > Again=2C I agree with your answer=2C determinism=2C i.e. worst case laten= cy is > what matters for a real-time system=2C but: > - smaller worst case latency covers a broader range of applications=3B > - smaller average case latency means more CPU cycles for the Linux > kernel to run=2C so=2C the dual-kernels based solutions still try to > preserve the average case latency and are a bit special with regard to > that particular question. > > -- > Gilles. > > _______________________________________________ > Xenomai-core mailing list > Xenomai-core@domain.hid > https://mail.gna.org/listinfo/xenomai-core = From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Berger Date: Tue, 05 Apr 2011 21:36:25 +0300 Message-ID: References: <4D9B4EC0.5080701@domain.hid> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit In-Reply-To: <4D9B4EC0.5080701@domain.hid> Subject: Re: [Xenomai-core] Tiny Core Linux + xenomai/RTAI Reply-To: gmane@domain.hid List-Id: Xenomai life and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: xenomai@xenomai.org Hi Gilles, On 04/05/2011 08:17 PM, Gilles Chanteperdrix wrote: > > Ok, we are on Xenomai-core, so, let us discuss. If we admit that the OP > is indeed talking about latencies (a quantifiable measure of > determinism), suggesting that the effect on cache of the Linux kernel > might influence the latencies is not completely irrelevant: the > benchmark we make with Xenomai tend to consistently show that cache > thrashing by the Linux kernel has an effect on latencies. Yes this did not immediately come into my mind. Linux cache thrashing affects latencies of threads running under Xenomai (user and/or kernel space), but as you point out ( http://permalink.gmane.org/gmane.linux.real-time.xenomai.devel/8167 ) that is distro independent. I know that the answer to this question might not be trivial, but what would you suggest could be done to minimize cache thrashing? > > Also, having shorter latencies means that we cover a larger range of > user-application needs. So, we try to have short latencies. > Whoever wants to see Xenomai latencies in action can compile cyclictest with and without Xenomai and see the differences. On the platforms I've tried so far the differences are clearly visible;) Regards, Robert ...Never test for an error condition you don't know how to handle. My public pgp key is available at: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x90320BF1 From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4D9B69A4.7050902@domain.hid> Date: Tue, 05 Apr 2011 21:12:36 +0200 From: Gilles Chanteperdrix MIME-Version: 1.0 References: <4D9B4EC0.5080701@domain.hid> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai-core] Tiny Core Linux + xenomai/RTAI List-Id: Xenomai life and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: gmane@domain.hid Cc: xenomai@xenomai.org Robert Berger wrote: > Hi Gilles, > > On 04/05/2011 08:17 PM, Gilles Chanteperdrix wrote: >> Ok, we are on Xenomai-core, so, let us discuss. If we admit that the OP >> is indeed talking about latencies (a quantifiable measure of >> determinism), suggesting that the effect on cache of the Linux kernel >> might influence the latencies is not completely irrelevant: the >> benchmark we make with Xenomai tend to consistently show that cache >> thrashing by the Linux kernel has an effect on latencies. > > Yes this did not immediately come into my mind. Linux cache thrashing > affects latencies of threads running under Xenomai (user and/or kernel > space), but as you point out ( > http://permalink.gmane.org/gmane.linux.real-time.xenomai.devel/8167 ) > that is distro independent. Yes, and I completely agree with your answer, I was just replying for the sake of completeness. > > I know that the answer to this question might not be trivial, but what > would you suggest could be done to minimize cache thrashing? If we are talking embedded systems, you have control over the non real-time activities you run, you can try and be greedy in the way they use cache (I am not sure anyone really does that, I, for one, tried and optimize a toy application for cache usage to see that the effect is impressive). The other way, is not to minimize cache thrashing, but to minimize its effect on latencies. You can do that by increasing the frequency of the "critical" real-time task. By increasing its frequency, you make it more likely to remain in cache, and so decrease its latency. This is why, for instance, on most (*) platforms you get a better latency with smaller periods. On some embedded platforms, you also have the choice to lock some cache lines, or move some data or code to some fast memory essentially as fast as cache (TCMs or SRAMs on ARM). This is a promising solution, at least on ARM, where many SOCs have such special memory, but as far as I know, nobody tried yet and reported success of failure. (*) the exception being armv4 or armv5 without the FCSE extension, where the cache is flushed all the time anyway. > >> Also, having shorter latencies means that we cover a larger range of >> user-application needs. So, we try to have short latencies. >> > > Whoever wants to see Xenomai latencies in action can compile cyclictest > with and without Xenomai and see the differences. On the platforms I've > tried so far the differences are clearly visible;) Again, I agree with your answer, determinism, i.e. worst case latency is what matters for a real-time system, but: - smaller worst case latency covers a broader range of applications; - smaller average case latency means more CPU cycles for the Linux kernel to run, so, the dual-kernels based solutions still try to preserve the average case latency and are a bit special with regard to that particular question. -- Gilles.