linux2.4 to linux2.6 Kernel dispatch (4) __linux

Source: Internet
Author: User
Tags prev

7) struct mm_struct *prev_mm

Saves the ACTIVE_MM structure pointer of a process (called prev) that is scheduled after a process switch. Because the active_mm of prev in 2.6 is released after the process switch completes (Mmdrop ()), and prev active_mm entry may be NULL, it is necessary to reserve it in Runqueue.

8) unsigned long nr_running

The number of ready processes on this CPU, which is the sum of the number of processes in the active and expired two queues, and is an important parameter for describing this CPU load (see "Scheduler-related load Balancing").

9) unsigned long nr_switches

Records the number of process transitions that have occurred on this CPU since the scheduler was run.

unsigned long nr_uninterruptible

Log the number of processes that the CPU is still in the task_uninterruptible state, and the load information.

One ) atomic_t nr_iowait

Log the number of processes in which the CPU is dormant due to waiting for IO.

unsigned long Timestamp_last_tick

The last time the scheduled event occurred for this ready queue, which is used in load balancing (see "Scheduler-related load Balancing").

int Prev_cpu_load[nr_cpus]

Record the load state on each CPU when load is balanced (the nr_running value in the ready queue at this point) to analyze the load situation (see "Scheduler-related load Balancing").

) atomic_t *node_nr_running; int Prev_node_load[max_numnodes]

These two properties are valid only under the NUMA architecture, recording the number of ready processes on each NUMA node and the load at the time of the last load balancing operation (see "Scheduling under NUMA structure").

) task_t *migration_thread

A migration process that points to this CPU. Each CPU has a core thread for performing process migration operations (see "Scheduler-related load Balancing").

) struct List_head migration_queue

List of processes that need to be migrated (see "Scheduler-related load Balancing").

The

dispatch system code structure the implementation code for most scheduling systems, including the definition of  runqueue  structure, is in the [KERNEL/SCHED.C] file, The purpose of this is to centralize the code of all scheduling systems for easy updating and replacement. Unless otherwise noted, the code and function implementations cited herein are located in [KERNEL/SCHED.C].  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.