Misc on RBTree Thread Queue Priority Discipline Changes
Gedare Bloom
gedare at rtems.org
Wed Jul 9 15:34:19 UTC 2014
On Tue, Jul 8, 2014 at 5:37 PM, Joel Sherrill <joel.sherrill at oarcorp.com> wrote:
> Hi
>
> If you take the patches in their entirety, most of the tests
> appear to be about 500 bytes smaller on the erc32.
>
What is the change in wkspace size? Basically you add 3 pointers +
enum to each TCB / thd proxy, but remove some space for the control
node I guess. I would guess the code savings is worth it.
> None of the tmtests do priority based blocking so I can't
> report any changes there.
>
> There was historically a subroutine in the threadq calls for a discipline
> specific routine. Using the RBTree, this resulted in only 3-5 lines
> of code unique to the discipline in those discipline files. The other
> 20+ lines was duplicated. The last patch folds those subroutines into
> the main methods.
>
> There is still some room for clean up since the code that is in
> threadblockingoperationcancel.c is open coded there and
> three other places. So there are a total of four copies of this
> code in the tree.
>
> + rtems/src/eventsurrender.c
> + score/src/threadqdequeue.c
> + score/src/threadqextract.c
> + score/src/threadblockingoperationcancel.c
>
I do not see discipline used in threadblockingoperationcancel.c what
do you mean?
> Two of those need the debug check code and two do not.
> Also the method name isn't right for all four cases. It indicates
> its use on the "resource released in ISR" usage not the
> normal "clean up from blocking" case.
>
> Suggestions on a new name and whether this should be
> a real subroutine or a static inline is appreciated. Then I
> can rework and reduce the code duplication.
>
Propose the code; I'm not sure what you mean to refactor into the new function.
-Gedare
> --
> Joel Sherrill, Ph.D. Director of Research & Development
> joel.sherrill at OARcorp.com On-Line Applications Research
> Ask me about RTEMS: a free RTOS Huntsville AL 35805
> Support Available (256) 722-9985
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
More information about the devel
mailing list