[PATCH] score: Optimize EDF SMP scheduler ops

Joel Sherrill joel at rtems.org
Tue Oct 5 18:34:19 UTC 2021


On Tue, Oct 5, 2021 at 1:26 PM Sebastian Huber
<sebastian.huber at embedded-brains.de> wrote:
>
> The schedule operation is only called by rtems_task_mode().  It is
> called if preempt mode of the executing thread changes from disabled to
> enabled.  Since the EDF SMP scheduler does not support the disabled
> preemption mode, the schedule operation is never called.

Pulling this logic thread further, since disable preemption is not available in
SMP configurations, why even have this callout at all in SMP mode?

That should ripple up to rtems_task_mode() and eliminate some code also.

> ---
>  cpukit/include/rtems/score/scheduleredfsmp.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/cpukit/include/rtems/score/scheduleredfsmp.h b/cpukit/include/rtems/score/scheduleredfsmp.h
> index 6fef6fb86a..1841aa4a7b 100644
> --- a/cpukit/include/rtems/score/scheduleredfsmp.h
> +++ b/cpukit/include/rtems/score/scheduleredfsmp.h
> @@ -110,7 +110,7 @@ typedef struct {
>  #define SCHEDULER_EDF_SMP_ENTRY_POINTS \
>    { \
>      _Scheduler_EDF_SMP_Initialize, \
> -    _Scheduler_default_Schedule, \
> +    NULL, \
>      _Scheduler_EDF_SMP_Yield, \
>      _Scheduler_EDF_SMP_Block, \
>      _Scheduler_EDF_SMP_Unblock, \
> --
> 2.31.1
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel


More information about the devel mailing list