Function report |
Source Code:kernel\sched\core.c |
Create Date:2022-07-28 09:35:54 |
| Last Modify:2022-05-22 13:40:38 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:ext_switch - switch to the new MM and the new thread's register state.
Proto:static __always_inline struct rq *context_switch(struct rq *rq, struct task_struct *prev, struct task_struct *next, struct rq_flags *rf)
Type:struct rq
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct rq * | rq | |
| struct task_struct * | prev | |
| struct task_struct * | next | |
| struct rq_flags * | rf |
| 3345 | A facility to provide batching of the reload of page tables and* other process state with the actual context switch code for* paravirtualized guests(prev) |
| 3354 | If Not mm Then |
| 3355 | enter_lazy_tlb(active_mm, next) |
| 3358 | If mm Then mmgrab() - Pin a &struct mm_struct |
| 3360 | Else active_mm = NULL |
| 3362 | Else |
| 3363 | membarrier_switch_mm(rq, active_mm, mm) |
| 3372 | switch_mm_irqs_off(active_mm, mm, next) |
| 3374 | If Not mm Then |
| 3383 | prepare_lock_switch(rq, next, rf) |
| 3389 | Return sh_task_switch - clean up after a task-switch*@prev: the thread we just switched away from |
| Name | Describe |
|---|---|
| __schedule | __schedule() is the main scheduler function.* The main means of driving the scheduler and thus entering this function are:* 1. Explicit blocking: mutex, semaphore, waitqueue, etc.* 2. TIF_NEED_RESCHED flag is checked on interrupt and userspace return |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |