<div dir="ltr">Hi,<div><br><div>I had a small question. The scheduler struct inside percpu.h looks like:</div><div>------------------------------------------------------------------------------------------------------<br></div><div>    struct {<br>      /**<br>       * @brief The scheduler control of the scheduler owning this processor.<br>       *<br>       * This pointer is NULL in case this processor is currently not used by a<br>       * scheduler instance.<br>       */<br>      const struct _Scheduler_Control *control;<br><br>      /**<br>       * @brief The scheduler context of the scheduler owning this processor.<br>       *<br>       * This pointer is NULL in case this processor is currently not used by a<br>       * scheduler instance.<br>       */<br>      const struct Scheduler_Context *context;<br><br>      /**<br>       * @brief The idle thread for this processor in case it is online and<br>       * currently not used by a scheduler instance.<br>       */<br>      struct _Thread_Control *idle_if_online_and_unused;<br>    } Scheduler;<br></div><div>------------------------------------------------------------------------------------------------------</div><div>So, does this mean a CPU when active is always either executing an idle thread and is not being used by a scheduler (so has a thread attribute in the idle_if_online_and_unused), or is used by a scheduler and is executing a task ( which can not be an idle task)? Another equivalent question is do we have an idle scheduler node, like we have idle predefined threads that run on a CPU?  </div></div><div><br></div><div>Please let me know,</div><div>Thanks.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 14, 2020 at 8:28 PM Richi Dubey <<a href="mailto:richidubey@gmail.com">richidubey@gmail.com</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"><div dir="ltr">I understand. Thank you.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 14, 2020 at 7:05 PM Sebastian Huber <<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</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 14/07/2020 13:37, Richi Dubey wrote:<br>
<br>
>     Here we remove the affine ready queue if it<br>
>     exists from the chain of affine queues since now an affine thread is<br>
>     scheduled on a processor.<br>
><br>
> Why are we removing the entire affine queue corresponding to a <br>
> CPU when a single node of the queue gets scheduled?<br>
Because the highest priority affine thread is now a schedule one.<br>
</blockquote></div>
</blockquote></div>