[Bug 1789] Add Simple SMP Scheduler

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Thu May 12 16:09:10 UTC 2011


https://www.rtems.org/bugzilla/show_bug.cgi?id=1789

--- Comment #2 from Joel Sherrill <joel.sherrill at oarcorp.com> 2011-05-12 11:09:10 CDT ---
(In reply to comment #1)
> Some of these changes have been committed independently to separate the smp
> files. The 'simple smp' scheduler should be documented a little bit, with an
> explanation at least of the algorithmic overheads and general approach taken in
> scheduling. Other detailed comments follow.
> 
> schedulersimplesmpschedule.c:
> +/*
> + *  The following is very useful on the scheduler simulator when debugging
> + *  this algorithm.  You are not likely to be able to print like this when
> + *  running on a real system.
> + */
> +#if 0
> +#define D(format,...) printf( format, __VA_ARGS__)
> +#else
> +#define D(format,...) 
> +#endif
> Cut/replace these (#ifdef RTEMS_DEBUG ..printf/printk)

You don't want this to be RTEMS_DEBUG.  It is not consistency checks.
It is literally printing the decision process.  It is horribly noisy.
I did change it to printk() and added an explanation of why it is "if 0"
and not RTEMS_DEBUG.

If the algorithm needs to be tinkered with, it is needed to help
track the decision process.

> +bool _Scheduler_simple_smp_Assign(
> Need some comments on what this function is doing, what the return value means.

Got it.

> +  for (n = _Chain_First( chain ); !_Chain_Is_tail(chain, n); n = n->next) {
> Should use _Chain_Next(n)

Thanks.  Old habits are hard to break.

> _Scheduler_simple_Ready_queue_Enqueue()
> This one slipped by me before. It should not have a capital E in enqueue. The
> same goes for the other functions named similarly (grep simple_Ready) that are
> already in the CVS.

Good eye.  I just committed this.  Hopefully I caught them all.

-- 
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the bugs mailing list