[PATCH 8/8] score: Add scheduler assignments for SMP

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Apr 14 14:32:23 UTC 2014


On 2014-04-14 15:53, Gedare Bloom wrote:
> On Mon, Apr 14, 2014 at 9:15 AM, Sebastian Huber
> <sebastian.huber at embedded-brains.de>  wrote:
>> >On 2014-04-12 07:44, Gedare Bloom wrote:
>>> >>
>>> >>I'm having some concerns that this way of configuring a system may be
>>> >>overly complex, and once we "commit" to it we will be stuck with the
>>> >>complexity of this approach. Please consider some ways to simplify the
>>> >>user-level interface for scheduler configuration.
>>> >>
>>> >>I suppose this is part and parcel of RTEMS configuration in general,
>>> >>but the amount of extra logic required here beyond the usual approach
>>> >>in RTEMS of setting maximum constraints has me troubled.
>> >
>> >
>> >I don't think the configuration is overly complex.  It is
>> >clustered/partitioned scheduling itself that is complex.
>> >
>> >A configure option like
>> >
>> >#define CONFIGURE_THE_CLUSTERED_SCHEDULERS_HOW_I_NEED_IT
>> >
>> >is beyond the capabilities of the current C pre-processor;-)
>> >
>> >I updated the configuration documentation with a more detail example.  I
>> >think its pretty easy to configure it.
>> >
> I'd consider something more along the lines of the following as quite
> a bit easier to use:
> #define CONFIGURE_SCHEDULER_THAT_I_WANT(tag, name, mandatory_cores,
> optional_cores)
>
> Using the example from the new patch, everything between
> RTEMS_SCHEDULER_CONTEXT_PRIORITY_SMP through the end of the assignment
> table would become:
>
> #define CONFIGURE_SCHEDULER_PRIORITY_SMP(io, rtems_build_name('I',
> 'O', ' ', ' '), 0x1, 0x0)
> #define CONFIGURE_SCHEDULER_PRIORITY_SMP(work, rtems_build_name('W',
> 'O', 'R', 'K'), 0x0c, 0xf0)
> or even
> #define CONFIGURE_SCHEDULER(THAT_I_WANT, tag, name, mandatory, optional)
> so the user can specify the scheduler as part of the macro parameters.
>
> The CONFIGURE_SCHEDULER() macro then "explodes" into the rest of the
> macros, and you can use #if statements to check the bit fields
> specified in mandatory and optional, hidden from view of the user.

Using integers as bit fields limits you to some integer type.  My approach has 
no such restriction.  I don't think that bit fields are easier to understand 
and review.  My approach avoids a couple of run-time errors due to the chosen 
data structures and initialization macros.

-- 
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.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list