libBSD and CPU Load display questions in SMP mode
Chris Johns
chrisj at rtems.org
Wed Oct 17 07:20:36 UTC 2018
On 17/10/18 5:17 pm, Sebastian Huber wrote:
> On 17/10/2018 07:59, Chris Johns wrote:
>> On 17/10/18 4:05 pm, Sebastian Huber wrote:
>>> On 17/10/2018 02:46, Chris Johns wrote:
>>>> On 16/10/2018 19:34, Sebastian Huber wrote:
>>>>> On 16/10/2018 10:28, jameszxj wrote:
>>>>>> CPU:zynq z7020 RTEMS version: master version
>>>>>> SMP define:
>>>>>> #define CONFIGURE_MAXIMUM_PROCESSORS 2
>>>>>>
>>>>>> #if 1
>>>>>> #define CONFIGURE_MAXIMUM_PRIORITY 255
>>>>>>
>>>>>> #define CONFIGURE_SCHEDULER_PRIORITY_SMP
>>>>> The only SMP scheduler supported by libbsd is:
>>>>>
>>>>> #define CONFIGURE_SCHEDULER_EDF_SMP
>>>> Why does the restriction exist?
>>> This SMP scheduler implementation is the only one in RTEMS that supports thread
>>> pinning. It is the default scheduler.
>> The documentation says:
>>
>> In case no explicit clustered scheduler configuration is present, then it
>> is used as the scheduler for exactly one processor.
>
> You mean
>
> https://docs.rtems.org/branches/master/c-user/configuring_a_system.html#configure-scheduler-edf
>
> ?
>
Yes.
>>
>> I do not know what this means.
>
> I think the wording is clear. It describes the CONFIGURE_SCHEDULER_EDF
> configuration option.
>
I read it as ... "if I do not provide a clustered scheduler config then EDF is
used for just a single processor so if I have more than one processor something
else is used on that but what is the something else" .. but I am not sure.
>> I see the default is mentioned just after this. I
>> wonder if a section about the defaults in either 24.21 and/or 24.22?
>
> The section 24.21 is about the general scheduler configuration. This
> configuration is optional. Maybe we should clarify this in the section entry.
Yes, I think this needs to be front and center somewhere. It makes sense once
you understand however we should help new users coming on board with RTEMS.
>
> The section 24.22 is about the clustered scheduler configuration. This
> configuration is also optional.
>
Yes and it has the default scheduler comment.
>>
>> The clustered scheduling section has:
>>
>> A clustered scheduler configuration is optional. By default, up to 32
>> processors are managed by the EDF SMP Scheduler.
>>
>> It is not clear if the default is 32 processors, the scheduler or both.
>
> By default means if you didn't configure anything.
What about ...
A clustered scheduler configuration is optional. If configured the default
scheduler, up to 32 processors, is the EDF SMP Scheduler.
> In this case up to 32
> processors are managed by the EDF SMP Scheduler. The configured maximum
> processors is defined by
>
> https://docs.rtems.org/branches/master/c-user/configuring_a_system.html#configure-maximum-processors
>
Would a reference be useful? :)
>
>>
>>> A clustered scheduler configuration is
>>> optional and should be done only for very good reasons.
>> Sure.
>>
>>>>>> 2.when I connect to RTEMS with ftp or telnet, system reset.
>>>>>> If just only define CONFIGURE_MAXIMUM_PROCESSORS,ftp and telnet is ok.
>>>>>>
>>>>>> *** FATAL ***
>>>>>> fatal source: 10 (RTEMS_FATAL_SOURCE_SMP)
>>>>>> fatal code: 7 (0x00000007)
>>>>> This is:
>>>>>
>>>>> SMP_FATAL_SCHEDULER_PIN_OR_UNPIN_NOT_SUPPORTED
>>>>>
>>>> Who is pinning threads?
>>> Thread pinning
>>>
>>> https://docs.rtems.org/branches/master/c-user/symmetric_multiprocessing_services.html#thread-pinning
>>>
>>>
>>>
>>> is used by the Epoch Based Reclamation (EBR) implementation:
>>>
>>> https://git.rtems.org/rtems-libbsd/tree/rtemsbsd/rtems/rtems-kernel-epoch.c
>>>
>> OK. Does FreeBSD pin threads as well?
>
> Yes, this is why we have this stuff as well.
>
OK and thanks.
Chris
More information about the devel
mailing list