Re: when/how is the schedule() function actually called?

Dawei Li <[email protected]>
Newsgroups gmane.linux.kernel.kernelnewbies
Message-ID <CAG5MgCrRx6YKXTc-Yv=0rjCBXpU2ARSq-meJEtw9iGzHbOGxgw@mail.gmail.com>
Hi Billie,

Thanks for getting back to me!
Many sources mentioned the same thing, but where do I find the code that
supports this?

I followed the comment here:
https://github.com/torvalds/linux/blob/c527f5606aa545233a4d2c6d5c636ed82b8633ef/kernel/sched/core.c#L6536C10-L6536C10
to check all the following files:
arch/x86/entry/entry_32.S
arch/x86/entry/entry_64_compat.S
arch/x86/entry/entry_64.S
arch/x86/entry/entry.S

But I don't see any code that is calling the schedule or __schedule
function.

On Sat, Dec 9, 2023 at 3:10 AM Billie Alsup (balsup) <[email protected]>
wrote:

> >From: Dawei Li <[email protected]>
> >When/how is the schedule() function actually called?
>
> I vaguely recall the actual switch taking place at the end of an
> interrupt,
> and/or during the return from a syscall, or on explicit request (e.g.
> yield).
> Look at __schedule and context_switch functions.
>
>
>
>

_______________________________________________
Kernelnewbies mailing list
[email protected]
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.