Re: SMP related question
On Mon, Aug 20, 2018 at 1:23 AM, Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > > > On 12/08/18 00:41, Chris Johns wrote: > >> On 10/08/2018 22:30, Sebastian Huber wrote: >> >>> Hello Stavros, >>> >>> you can do this with a custom clustered scheduler configuration: >>> >>> https://docs.rtems.org/branches/master/c-user/configuring_a_ >>> system.html#clustered-scheduler-configuration >>> >>> I had a brief look over the documentation you provided but could not see >> how to >> achieve the result you are saying. >> > > Stavros, asked for two things. > > 1. A way to change properties of the initialization task which are not > covered by configuration options > > https://docs.rtems.org/branches/master/c-user/configuring_a_ > system.html#classic-api-initialization-tasks-table-configuration > > before the initialization task runs. To do this some user provided code > must execute after the initialization task is created and before it runs. > My suggestion to use a device driver initialization function for this > doesn't work. The initialization task is created after the device driver > initialization. It can be done via a system initialization handler using > the undocumented RTEMS_SYSINIT_ITEM(). Maybe also a high priority > constructor, however, in this case the task already runs. > The high priority constructor is too late if the goal is to avoid any activity except core 0. RTEMS_SYSINIT_ITEM() would work but adding a confdefs.h item for SMP configurations to pin the thread to a single core seems like a simple solution. > > 2. A way to pin a task to a particular processor. There are two options to > do this in RTEMS. One is a clustered scheduler configuration, the other is > the use of a thread to processor affinity. I think being able to pin the Init thread to a single core would be a nice confdefs.h feature. Not specifying a full cpuset, just the core number. I don't think this use case is enough by itself to force a user to clustered scheduling with core 0 an instance by itself. > > > >> Alternatively, on a recent version the default SMP scheduler supports a >>> one-to-one affinity. You can set it in a device driver. >>> >> Is there an example of how to do this? >> > As Sebastian points out, you can't do it in a device driver. But no, there is no example specifically for the Init thread. There are smptests which do this but likely no proper example of setting affinity, scheduler, etc. --joel > >> Chris >> >> - Am 10. Aug 2018 um 14:10 schrieb Passas, Stavros >>> stavros.pas...@intel.com: >>> >>> Hi, In my local SMP enabled RTEMS, I notice core1 starting the Init() function of the user application. Is there a way to enforce RTEMS to run the Init() in the boot processor, when SMP is enabled? Best Regards, Stavros -- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. ___ users mailing list users@rtems.org http://lists.rtems.org/mailman/listinfo/users >>> ___ >>> users mailing list >>> users@rtems.org >>> http://lists.rtems.org/mailman/listinfo/users >>> >>> ___ >> users mailing list >> users@rtems.org >> http://lists.rtems.org/mailman/listinfo/users >> > > -- > Sebastian Huber, embedded brains GmbH > > Address : Dornierstr. 4, D-82178 Puchheim, Germany > Phone : +49 89 189 47 41-16 > Fax : +49 89 189 47 41-09 > E-Mail : sebastian.hu...@embedded-brains.de > PGP : Public key available on request. > > Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. > > > ___ > users mailing list > users@rtems.org > http://lists.rtems.org/mailman/listinfo/users > ___ users mailing list users@rtems.org http://lists.rtems.org/mailman/listinfo/users
Re: How to configure _Sysinit handler list?
On 20/08/18 08:20, Chris Johns wrote: On 20/08/2018 16:01, Sebastian Huber wrote: On 20/08/18 05:12, Chris Johns wrote: On 17/08/2018 02:21, Aaron Bufkin wrote: Never mind. I figured it out. The RTEMS_SYSINIT_ITEM() macro allows me to insert initialization handlers to the loop that I mentioned earlier. Thank you for let us know. If you think the documentation in ... https://docs.rtems.org/branches/master/c-user/initialization.html .. could be improved we would welcome a patch. The question is, if this stuff is part of the API. The RTEMS_* name suggests it, however, I am not sure if we should make this a documented interface. I do not know, I suppose the test we should apply is what we are prepared to support, ie is the interface forward and backward compatibility? I, like you used RTEMS_* as a namespace but I do not think everything with RTEMS_* can be considered a formally supported interface. I do not know enough about the implementation here to comment on this specific item. The system initialization is still work in progress. The RTEMS_SYSINIT_ITEM() macro itself should be stable. -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.hu...@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. ___ users mailing list users@rtems.org http://lists.rtems.org/mailman/listinfo/users
Re: SMP related question
On 12/08/18 00:41, Chris Johns wrote: On 10/08/2018 22:30, Sebastian Huber wrote: Hello Stavros, you can do this with a custom clustered scheduler configuration: https://docs.rtems.org/branches/master/c-user/configuring_a_system.html#clustered-scheduler-configuration I had a brief look over the documentation you provided but could not see how to achieve the result you are saying. Stavros, asked for two things. 1. A way to change properties of the initialization task which are not covered by configuration options https://docs.rtems.org/branches/master/c-user/configuring_a_system.html#classic-api-initialization-tasks-table-configuration before the initialization task runs. To do this some user provided code must execute after the initialization task is created and before it runs. My suggestion to use a device driver initialization function for this doesn't work. The initialization task is created after the device driver initialization. It can be done via a system initialization handler using the undocumented RTEMS_SYSINIT_ITEM(). Maybe also a high priority constructor, however, in this case the task already runs. 2. A way to pin a task to a particular processor. There are two options to do this in RTEMS. One is a clustered scheduler configuration, the other is the use of a thread to processor affinity. Alternatively, on a recent version the default SMP scheduler supports a one-to-one affinity. You can set it in a device driver. Is there an example of how to do this? Chris - Am 10. Aug 2018 um 14:10 schrieb Passas, Stavros stavros.pas...@intel.com: Hi, In my local SMP enabled RTEMS, I notice core1 starting the Init() function of the user application. Is there a way to enforce RTEMS to run the Init() in the boot processor, when SMP is enabled? Best Regards, Stavros -- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. ___ users mailing list users@rtems.org http://lists.rtems.org/mailman/listinfo/users ___ users mailing list users@rtems.org http://lists.rtems.org/mailman/listinfo/users ___ users mailing list users@rtems.org http://lists.rtems.org/mailman/listinfo/users -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.hu...@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. ___ users mailing list users@rtems.org http://lists.rtems.org/mailman/listinfo/users
Re: How to configure _Sysinit handler list?
On 20/08/2018 16:01, Sebastian Huber wrote: > On 20/08/18 05:12, Chris Johns wrote: >> On 17/08/2018 02:21, Aaron Bufkin wrote: >>> Never mind. I figured it out. The RTEMS_SYSINIT_ITEM() macro allows me to >>> insert initialization handlers to the loop that I mentioned earlier. >> Thank you for let us know. If you think the documentation in ... >> >> https://docs.rtems.org/branches/master/c-user/initialization.html >> >> .. could be improved we would welcome a patch. > > The question is, if this stuff is part of the API. The RTEMS_* name suggests > it, > however, I am not sure if we should make this a documented interface. > I do not know, I suppose the test we should apply is what we are prepared to support, ie is the interface forward and backward compatibility? I, like you used RTEMS_* as a namespace but I do not think everything with RTEMS_* can be considered a formally supported interface. I do not know enough about the implementation here to comment on this specific item. Chris ___ users mailing list users@rtems.org http://lists.rtems.org/mailman/listinfo/users
Re: How to configure _Sysinit handler list?
On 20/08/18 05:12, Chris Johns wrote: On 17/08/2018 02:21, Aaron Bufkin wrote: Never mind. I figured it out. The RTEMS_SYSINIT_ITEM() macro allows me to insert initialization handlers to the loop that I mentioned earlier. Thank you for let us know. If you think the documentation in ... https://docs.rtems.org/branches/master/c-user/initialization.html .. could be improved we would welcome a patch. The question is, if this stuff is part of the API. The RTEMS_* name suggests it, however, I am not sure if we should make this a documented interface. -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.hu...@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. ___ users mailing list users@rtems.org http://lists.rtems.org/mailman/listinfo/users