linux-newbie.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* when/how is the schedule() function actually called?
@ 2023-12-07  5:59 Dawei Li
  0 siblings, 0 replies; only message in thread
From: Dawei Li @ 2023-12-07  5:59 UTC (permalink / raw)
  To: linux-newbie, kernel-janitors, linux-smp

Greetings!

I am reading several resources regarding the linux kernel scheduling
in kernel 2.6.34.
There seems to be the periodic scheduler (tick_periodic()), which
invokes the scheduler_tick() function, then the entity_tick()
function, and then the resched_task() function. However, eventually,
the resched_task() function doesn't invoke the schedule() function; it
only invokes the set_tsk_need_resched() function. So, it is only
setting the need_resched flag.
My question is, when/how is the schedule() function actually called?
Also, I notice that at many locations in the code, when there is the
need to do a scheduling, the code is just setting the need_resched
flag. Same question: when/how is the schedule() function actually
called?

Not sure if this list is still active. Appreciate any response.
Thanks!

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-12-07  6:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-07  5:59 when/how is the schedule() function actually called? Dawei Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).