<div dir="ltr">Hi Billie,<div><br></div><div>Thanks for getting back to me!</div><div>Many sources mentioned the same thing, but where do I find the code that supports this?</div><div><br></div><div>I followed the comment here:</div><div><a href="https://github.com/torvalds/linux/blob/c527f5606aa545233a4d2c6d5c636ed82b8633ef/kernel/sched/core.c#L6536C10-L6536C10">https://github.com/torvalds/linux/blob/c527f5606aa545233a4d2c6d5c636ed82b8633ef/kernel/sched/core.c#L6536C10-L6536C10</a><br></div><div>to check all the following files:</div><div><div>arch/x86/entry/entry_32.S</div><div><div>arch/x86/entry/entry_64_compat.S</div><div><div>arch/x86/entry/entry_64.S</div></div><div><div>arch/x86/entry/entry.S</div><div><br></div><div>But I don't see any code that is calling the schedule or __schedule function.</div></div></div></div></div><img src="https://email-signature-image.com/signature.gif?u=36542&e=467932052&v=1816fcdec7411f1bc3e562cf2e585848ba2f36c3f4d0560c5544708b70f34efb" alt="" width="0" height="0" style="width:2px;max-height:0;overflow:hidden"><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Dec 9, 2023 at 3:10 AM Billie Alsup (balsup) <<a href="mailto:balsup@cisco.com">balsup@cisco.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">>From: Dawei Li <<a href="mailto:daweilics@gmail.com" target="_blank">daweilics@gmail.com</a>><br>
>When/how is the schedule() function actually called? <br>
<br>
I vaguely recall the actual switch taking place at the end of an interrupt, <br>
and/or during the return from a syscall, or on explicit request (e.g. yield).<br>
Look at __schedule and context_switch functions.<br>
<br>
<br>
<br>
</blockquote></div>