<div dir="ltr"><span class="gmail-im" style="color:rgb(80,0,80)"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Your scheduler is a unique piece of software. It may be making assumptions that are not checked in the generic scheduler code. And checks in other schedulers are of no use to you.<br>There may not be any but this is something to consider. There are existing checks scattered throughout the source. Do any need to be in your scheduler?</blockquote></span><div>I understand. Thanks.</div><span class="gmail-im" style="color:rgb(80,0,80)"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Simulators tend to run slowly. They also may spend a long time when testing RTEMS executing the idle thread waiting for time to pass. Fast idle just says if a clock tick occurs while the idle thread is running, call clock tick over and over until another thread is unblocked and preempts idle.  </blockquote></span><div>This is hard to understand. </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Looking across all failing tests usually helps. For some reason, one tends to be easier to debug than the others.</blockquote><div>Got it. I'll read all the failing tests once.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Also some of the tests have a lot of code up front that doesn't impact what you are testing. It may be possible to disable early parts of sp16 to reduce what you have to step through and compare schedulers.d</blockquote><div>This is great advice, thanks. How do I disable the early unwanted parts? I can't comment it, nor can I set an appropriate breakpoint. What should I do?</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-im" style="color:rgb(80,0,80)">> That's a bad typo or auto-correct. Probably should have been tactic.<br></span>tracing</blockquote><div>I understand. Thanks.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 13, 2020 at 11:06 PM Gedare Bloom <<a href="mailto:gedare@rtems.org">gedare@rtems.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Mon, Oct 12, 2020 at 11:19 AM Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>> wrote:<br>
><br>
><br>
><br>
> On Mon, Oct 12, 2020 at 10:47 AM Richi Dubey <<a href="mailto:richidubey@gmail.com" target="_blank">richidubey@gmail.com</a>> wrote:<br>
>>><br>
>>> There are existing checks scattered throughout the source. Do any need to be in your scheduler?<br>
>><br>
>> I don't understand. If there are already checks scattered through, why do I need more checks in my scheduler? Are these checks independent from the checks I might need in the scheduler? Please explain.<br>
><br>
><br>
> Your scheduler is a unique piece of software. It may be making assumptions that are not checked in the generic scheduler code. And checks in other schedulers are of no use to you.<br>
><br>
> There may not be any but this is something to consider.<br>
><br>
>><br>
>><br>
>>> + Looks like the bsp has fast idle on but that should not impact anything.<br>
>><br>
>> What's fast idle? I found this. :p How can time run as fast as possible?<br>
><br>
><br>
> Simulators tend to run slowly. They also may spend a long time when testing RTEMS executing the idle thread waiting for time to pass. Fast idle just says if a clock tick occurs while the idle thread is running, call clock tick over and over until another thread is unblocked and preempts idle.<br>
>><br>
>><br>
>>> + Run this with the another scheduler and see if you can identify when that scheduler makes the decision you are missing. There has to be one of the scheduler hooks that is making a different decision. Run the test side by side with two different schedulers. Alternate forward motion in the two and compare the behaviour.<br>
>><br>
>> This is genius. Thanks a lot. I'm gonna work on this.<br>
>><br>
>>> + Adding trading might help but is probably more trouble to set up than just comparing good and bad schedulers in parallel.<br>
>><br>
>> What's trading?<br>
><br>
><br>
> That's a bad typo or auto-correct. Probably should have been tactic.<br>
tracing<br>
<br>
>><br>
>><br>
>>> + Look at what every failing test is doing. May be a common issue and one is easier to debug<br>
>><br>
>> Thanks. I'll check this.<br>
><br>
><br>
> Looking across all failing tests usually helps. For some reason, one tends to be easier to debug than the others.<br>
><br>
> Also some of the tests have a lot of code up front that doesn't impact what you are testing. It may be possible to disable early parts of sp16 to reduce what you have to step through and compare schedulers.<br>
><br>
> --joel<br>
>><br>
>><br>
>><br>
>> On Sun, Oct 11, 2020 at 5:08 AM Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>> wrote:<br>
>>><br>
>>><br>
>>><br>
>>> On Sat, Oct 10, 2020, 10:47 AM Richi Dubey <<a href="mailto:richidubey@gmail.com" target="_blank">richidubey@gmail.com</a>> wrote:<br>
>>>><br>
>>>> Hi Mr. Huber,<br>
>>>><br>
>>>> Thanks for checking in.<br>
>>>><br>
>>>>> I suggested to enable your new scheduler implementation as the default<br>
>>>>> to check if it is in line with the standard schedulers. I would first<br>
>>>>> get some high level data. Select a BSP with good test results on a<br>
>>>>> simulator (for example sparc/leon3 or arm/realview_pbx_a9_qemu). Run the<br>
>>>>> tests and record the test data. Then enable the SMP EDF scheduler as the<br>
>>>>> default, run the tests, record the data. Then enable your scheduler as<br>
>>>>> the default, run the tests, record the data. Then get all tests which<br>
>>>>> fail only with your scheduler.<br>
>>>><br>
>>>> Yes, this is something I've already done based on your previous suggestion. I set SCHEDULER_STRONG_APA(the current RTEMS master's version) as the default scheduler for both sp and SMP and ran the test (on both sparc/leon3 and arm/realview_pbx_a9_qemu). Then I set SCHEDULER_STRONG_APA(my version) as the default scheduler for both sp and SMP and ran the test and compared it with the master's strong apa result. The following (extra) tests failed:<br>
>>>><br>
>>>>  sp02.exe<br>
>>>>  sp16.exe<br>
>>>>  sp30.exe<br>
>>>>  sp31.exe<br>
>>>>  sp37.exe<br>
>>>>  sp42.exe<br>
>>>>  spfatal29.exe<br>
>>>>  tm24.exe<br>
>>>><br>
>>>>> Do a high level analysis of all failing<br>
>>>>><br>
>>>>> tests. Try to figure out a new scenario for the test smpstrongapa01.<br>
>>>><br>
>>>> Okay, I would look into this. This is a great suggestion, thanks!<br>
>>>><br>
>>>><br>
>>>>> Do all the development with RTEMS_DEBUG enabled!<br>
>>>>> Add _Assert() stuff to your scheduler. Check pre- and post-conditions of<br>
>>>>> all operations. Check invariants.<br>
>>>><br>
>>>> How do I check postconditions? Using _Assert() or by manually debugging each function call?<br>
>>><br>
>>><br>
>>> There are existing checks scattered throughout the source. Do any need to be in your scheduler?<br>
>>><br>
>>> Random thoughts:<br>
>>><br>
>>> + Looks like the bsp has fast idle on but that should not impact anything.<br>
>>><br>
>>> + Run this with the another scheduler and see if you can identify when that scheduler makes the decision you are missing. There has to be one of the scheduler hooks that is making a different decision. Run the test side by side with two different schedulers. Alternate forward motion in the two and compare the behaviour.<br>
>>><br>
>>> + Adding trading might help but is probably more trouble to set up than just comparing good and bad schedulers in parallel.<br>
>>><br>
>>> + Look at what every failing test is doing. May be a common issue and one is easier to debug<br>
>>><br>
>>> --joel<br>
>>>><br>
>>>><br>
>>>><br>
>>>><br>
>>>> On Sat, Oct 10, 2020 at 6:09 PM Sebastian Huber <<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>> wrote:<br>
>>>>><br>
>>>>> Hello Richi,<br>
>>>>><br>
>>>>> I suggested to enable your new scheduler implementation as the default<br>
>>>>> to check if it is in line with the standard schedulers. I would first<br>
>>>>> get some high level data. Select a BSP with good test results on a<br>
>>>>> simulator (for example sparc/leon3 or arm/realview_pbx_a9_qemu). Run the<br>
>>>>> tests and record the test data. Then enable the SMP EDF scheduler as the<br>
>>>>> default, run the tests, record the data. Then enable your scheduler as<br>
>>>>> the default, run the tests, record the data. Then get all tests which<br>
>>>>> fail only with your scheduler. Do a high level analysis of all failing<br>
>>>>> tests. Try to figure out a new scenario for the test smpstrongapa01.<br>
>>>>><br>
>>>>> Do all the development with RTEMS_DEBUG enabled!<br>
>>>>><br>
>>>>> Add _Assert() stuff to your scheduler. Check pre- and post-conditions of<br>
>>>>> all  operations. Check invariants.<br>
>>>>><br>
>>>> _______________________________________________<br>
>>>> devel mailing list<br>
>>>> <a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
>>>> <a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
><br>
> _______________________________________________<br>
> devel mailing list<br>
> <a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
> <a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
</blockquote></div>