public inbox for kernelnewbies@kernelnewbies.org
 help / color / mirror / Atom feed
* when/how is the schedule() function actually called?
@ 2023-12-08 16:16 Dawei Li
  2023-12-08 17:44 ` Valdis Klētnieks
  0 siblings, 1 reply; 7+ messages in thread
From: Dawei Li @ 2023-12-08 16:16 UTC (permalink / raw)
  To: kernelnewbies

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?
(Although I am using the 2.6.34 version, I believe the question is generally
applicable to any kernel version.)

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

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-12-14 17:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-08 16:16 when/how is the schedule() function actually called? Dawei Li
2023-12-08 17:44 ` Valdis Klētnieks
2023-12-08 18:21   ` Dawei Li
2023-12-08 19:10     ` Billie Alsup (balsup)
2023-12-10 16:59       ` Dawei Li
2023-12-14 17:13         ` Billie Alsup (balsup)
2023-12-08 19:47     ` iso m

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox