* [Xenomai] shielding fully CPU or CORE @ 2013-07-19 9:17 Skander Bahloul 2013-07-20 7:54 ` Jan Kiszka 0 siblings, 1 reply; 6+ messages in thread From: Skander Bahloul @ 2013-07-19 9:17 UTC (permalink / raw) To: xenomai Dear Xenomai list members, On a successful instal (but without NVIDIA driver, cf my previous message), I am now starting using Xenomai. We need to : 1* shield fully a CPU or core, against the scheduler, interruption, etc 2* run a single thread on this isolated CPU or core Step 2 is OK with the Xenomai API. But how should I achieve step 1 ? I did not find advice in the Xenomai documentation. I guess it should be done with : $ sudo shield -a 0-3 -m -1 Do you agree ? When may I find detailed info on CPU shielding ? Thanks, Skander BAHLOUL ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai] shielding fully CPU or CORE 2013-07-19 9:17 [Xenomai] shielding fully CPU or CORE Skander Bahloul @ 2013-07-20 7:54 ` Jan Kiszka 2013-07-20 8:31 ` Gilles Chanteperdrix 2013-07-22 8:00 ` Kai Bollue 0 siblings, 2 replies; 6+ messages in thread From: Jan Kiszka @ 2013-07-20 7:54 UTC (permalink / raw) To: Skander Bahloul; +Cc: xenomai On 2013-07-19 11:17, Skander Bahloul wrote: > Dear Xenomai list members, > > On a successful instal (but without NVIDIA driver, cf my previous message), I am now starting using Xenomai. > > We need to : > 1* shield fully a CPU or core, against the scheduler, interruption, etc > 2* run a single thread on this isolated CPU or core > > Step 2 is OK with the Xenomai API. > But how should I achieve step 1 ? > > I did not find advice in the Xenomai documentation. > I guess it should be done with : > $ sudo shield -a 0-3 -m -1 > > Do you agree ? > When may I find detailed info on CPU shielding ? With "shield fully", do you mean 99,9...% or true 100%? The latter is not possible with current Linux kernels, thus also not with Xenomai. For the former, try kernel parameter isocpus (to keep Linux off certain cores), possibly in combination with xeno_hal.rthal_supported_cpus (to limit Xenomai to those cores). True CPU domination is possible via virtualization, e.g. I'm working on such a solution. But you will not get a Linux process environment for your RT task, rather a set of bare-metal CPU cores you will have to boot up yourself. Also, a lot of noise comes from other shared resources (besides the CPU core itself), like memory and specifically the links to the I/O devices (PCI bridges/buses...). So no miracle to expect that way as well, at least on x86. Jan -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 263 bytes Desc: OpenPGP digital signature URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20130720/83b0855b/attachment.pgp> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai] shielding fully CPU or CORE 2013-07-20 7:54 ` Jan Kiszka @ 2013-07-20 8:31 ` Gilles Chanteperdrix 2013-07-20 8:39 ` Jan Kiszka 2013-07-22 8:00 ` Kai Bollue 1 sibling, 1 reply; 6+ messages in thread From: Gilles Chanteperdrix @ 2013-07-20 8:31 UTC (permalink / raw) To: Jan Kiszka; +Cc: Skander Bahloul, xenomai On 07/20/2013 09:54 AM, Jan Kiszka wrote: > On 2013-07-19 11:17, Skander Bahloul wrote: >> Dear Xenomai list members, >> >> On a successful instal (but without NVIDIA driver, cf my previous message), I am now starting using Xenomai. >> >> We need to : >> 1* shield fully a CPU or core, against the scheduler, interruption, etc >> 2* run a single thread on this isolated CPU or core >> >> Step 2 is OK with the Xenomai API. >> But how should I achieve step 1 ? >> >> I did not find advice in the Xenomai documentation. >> I guess it should be done with : >> $ sudo shield -a 0-3 -m -1 >> >> Do you agree ? >> When may I find detailed info on CPU shielding ? > > With "shield fully", do you mean 99,9...% or true 100%? The latter is > not possible with current Linux kernels, thus also not with Xenomai. For > the former, try kernel parameter isocpus (to keep Linux off certain > cores), possibly in combination with xeno_hal.rthal_supported_cpus (to > limit Xenomai to those cores). Maybe a stupid idea, but can we not shutdown linux cpus, using cpu hotplug, so as to have full isolation? -- Gilles. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai] shielding fully CPU or CORE 2013-07-20 8:31 ` Gilles Chanteperdrix @ 2013-07-20 8:39 ` Jan Kiszka 2013-07-20 8:45 ` Gilles Chanteperdrix 0 siblings, 1 reply; 6+ messages in thread From: Jan Kiszka @ 2013-07-20 8:39 UTC (permalink / raw) To: Gilles Chanteperdrix; +Cc: Skander Bahloul, xenomai On 2013-07-20 10:31, Gilles Chanteperdrix wrote: > On 07/20/2013 09:54 AM, Jan Kiszka wrote: > >> On 2013-07-19 11:17, Skander Bahloul wrote: >>> Dear Xenomai list members, >>> >>> On a successful instal (but without NVIDIA driver, cf my previous >>> message), I am now starting using Xenomai. >>> >>> We need to : >>> 1* shield fully a CPU or core, against the scheduler, interruption, etc >>> 2* run a single thread on this isolated CPU or core >>> >>> Step 2 is OK with the Xenomai API. >>> But how should I achieve step 1 ? >>> >>> I did not find advice in the Xenomai documentation. >>> I guess it should be done with : >>> $ sudo shield -a 0-3 -m -1 >>> >>> Do you agree ? >>> When may I find detailed info on CPU shielding ? >> >> With "shield fully", do you mean 99,9...% or true 100%? The latter is >> not possible with current Linux kernels, thus also not with Xenomai. For >> the former, try kernel parameter isocpus (to keep Linux off certain >> cores), possibly in combination with xeno_hal.rthal_supported_cpus (to >> limit Xenomai to those cores). > > > Maybe a stupid idea, but can we not shutdown linux cpus, using cpu > hotplug, so as to have full isolation? We can, but we will also have to - reboot those CPUs - handle switches to Linux on the isolated cores (e.g. by migrating the task to a Linux core) - handle changes to the mm that is in use on isolated cores (TLB shotdowns) - handle Linux signals sent to Xenomai tasks on isolated cores And there might be more subtle traps when using a core under Xenomai that is offline for Linux. Nothing is impossible, but this is surely not straightforward. Jan -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 263 bytes Desc: OpenPGP digital signature URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20130720/560705cc/attachment.pgp> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai] shielding fully CPU or CORE 2013-07-20 8:39 ` Jan Kiszka @ 2013-07-20 8:45 ` Gilles Chanteperdrix 0 siblings, 0 replies; 6+ messages in thread From: Gilles Chanteperdrix @ 2013-07-20 8:45 UTC (permalink / raw) To: Jan Kiszka; +Cc: Skander Bahloul, xenomai On 07/20/2013 10:39 AM, Jan Kiszka wrote: > On 2013-07-20 10:31, Gilles Chanteperdrix wrote: >> On 07/20/2013 09:54 AM, Jan Kiszka wrote: >> >>> On 2013-07-19 11:17, Skander Bahloul wrote: >>>> Dear Xenomai list members, >>>> >>>> On a successful instal (but without NVIDIA driver, cf my previous >>>> message), I am now starting using Xenomai. >>>> >>>> We need to : >>>> 1* shield fully a CPU or core, against the scheduler, interruption, etc >>>> 2* run a single thread on this isolated CPU or core >>>> >>>> Step 2 is OK with the Xenomai API. >>>> But how should I achieve step 1 ? >>>> >>>> I did not find advice in the Xenomai documentation. >>>> I guess it should be done with : >>>> $ sudo shield -a 0-3 -m -1 >>>> >>>> Do you agree ? >>>> When may I find detailed info on CPU shielding ? >>> >>> With "shield fully", do you mean 99,9...% or true 100%? The latter is >>> not possible with current Linux kernels, thus also not with Xenomai. For >>> the former, try kernel parameter isocpus (to keep Linux off certain >>> cores), possibly in combination with xeno_hal.rthal_supported_cpus (to >>> limit Xenomai to those cores). >> >> >> Maybe a stupid idea, but can we not shutdown linux cpus, using cpu >> hotplug, so as to have full isolation? > > We can, but we will also have to > - reboot those CPUs > - handle switches to Linux on the isolated cores (e.g. by migrating > the task to a Linux core) > - handle changes to the mm that is in use on isolated cores (TLB > shotdowns) > - handle Linux signals sent to Xenomai tasks on isolated cores > > And there might be more subtle traps when using a core under Xenomai > that is offline for Linux. Nothing is impossible, but this is surely not > straightforward. Indeed, it was a stupid idea. -- Gilles. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai] shielding fully CPU or CORE 2013-07-20 7:54 ` Jan Kiszka 2013-07-20 8:31 ` Gilles Chanteperdrix @ 2013-07-22 8:00 ` Kai Bollue 1 sibling, 0 replies; 6+ messages in thread From: Kai Bollue @ 2013-07-22 8:00 UTC (permalink / raw) To: xenomai On 20.07.2013 09:54, Jan Kiszka wrote: > On 2013-07-19 11:17, Skander Bahloul wrote: >> Dear Xenomai list members, >> >> On a successful instal (but without NVIDIA driver, cf my previous message), I am now starting using Xenomai. >> >> We need to : >> 1* shield fully a CPU or core, against the scheduler, interruption, etc >> 2* run a single thread on this isolated CPU or core >> >> Step 2 is OK with the Xenomai API. >> But how should I achieve step 1 ? >> >> I did not find advice in the Xenomai documentation. >> I guess it should be done with : >> $ sudo shield -a 0-3 -m -1 >> >> Do you agree ? >> When may I find detailed info on CPU shielding ? > With "shield fully", do you mean 99,9...% or true 100%? The latter is > not possible with current Linux kernels, thus also not with Xenomai. For > the former, try kernel parameter isocpus (to keep Linux off certain > cores), possibly in combination with xeno_hal.rthal_supported_cpus (to > limit Xenomai to those cores). If you use an AMD CPU with "Bulldozer" / "Piledriver" architecture, for better latencies, it helps to keep Linux off of both cores on one module, as they share certain ressources. E.g. use isolcpus=0,1 and bind your Xenomai task to CPU0. Regards, Kai ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-07-22 8:00 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-07-19 9:17 [Xenomai] shielding fully CPU or CORE Skander Bahloul 2013-07-20 7:54 ` Jan Kiszka 2013-07-20 8:31 ` Gilles Chanteperdrix 2013-07-20 8:39 ` Jan Kiszka 2013-07-20 8:45 ` Gilles Chanteperdrix 2013-07-22 8:00 ` Kai Bollue
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.