2009년 11월 13일 금요일

sched.h

 커널 버전 2.6.30.5 이라서 다른 부분이 많다.

 

kernel/sched.c  

 

  569 struct rq {
  570     /* runqueue lock: */
  571     spinlock_t lock;
  572
  573     /*
  574      * nr_running and cpu_load should be in the same cacheline because
  575      * remote CPUs use both these fields when doing load calculation.
  576      */
  577     unsigned long nr_running;
  578     #define CPU_LOAD_IDX_MAX 5
  579     unsigned long cpu_load[CPU_LOAD_IDX_MAX];
  580 #ifdef CONFIG_NO_HZ
  581     unsigned long last_tick_seen;
  582     unsigned char in_nohz_recently;
  583 #endif
  584     /* capture load from *all* tasks on this cpu: */
  585     struct load_weight load;
  586     unsigned long nr_load_updates;
  587     u64 nr_switches;
  588
  589     struct cfs_rq cfs;
  590     struct rt_rq rt;
  591
  592 #ifdef CONFIG_FAIR_GROUP_SCHED
  593     /* list of leaf cfs_rq on this cpu: */
  594     struct list_head leaf_cfs_rq_list;
  595 #endif
  596 #ifdef CONFIG_RT_GROUP_SCHED
  597     struct list_head leaf_rt_rq_list;
  598 #endif
  599
  600     /*

  601      * This is part of a global counter where only the total sum
  602      * over all CPUs matters. A task can increase this counter on
  603      * one CPU and if it got migrated afterwards it may decrease
  604      * it on another CPU. Always updated under the runqueue lock:
  605      */
  606     unsigned long nr_uninterruptible;
  607
  608     struct task_struct *curr, *idle;
  609     unsigned long next_balance;
  610     struct mm_struct *prev_mm;
  611
  612     u64 clock;
  613
  614     atomic_t nr_iowait;
  615
  616 #ifdef CONFIG_SMP
  617     struct root_domain *rd;
  618     struct sched_domain *sd;
  619
  620     unsigned char idle_at_tick;
  621     /* For active balancing */
  622     int active_balance;
  623     int push_cpu;
  624     /* cpu of this runqueue: */
  625     int cpu;
  626     int online;
  627
  628     unsigned long avg_load_per_task;
  629
  630     struct task_struct *migration_thread;
  631     struct list_head migration_queue;
  632 #endif

  633
  634 #ifdef CONFIG_SCHED_HRTICK
  635 #ifdef CONFIG_SMP
  636     int hrtick_csd_pending;
  637     struct call_single_data hrtick_csd;
  638 #endif
  639     struct hrtimer hrtick_timer;
  640 #endif
  641
  642 #ifdef CONFIG_SCHEDSTATS
  643     /* latency stats */
  644     struct sched_info rq_sched_info;
  645     unsigned long long rq_cpu_time;
  646     /* could above be rq->cfs_rq.exec_clock + rq->rt_rq.rt_runtime ? */
  647
  648     /* sys_sched_yield() stats */
  649     unsigned int yld_count;
  650
  651     /* schedule() stats */
  652     unsigned int sched_switch;
  653     unsigned int sched_count;
  654     unsigned int sched_goidle;
  655
  656     /* try_to_wake_up() stats */
  657     unsigned int ttwu_count;
  658     unsigned int ttwu_local;
  659
  660     /* BKL stats */
  661     unsigned int bkl_count;
  662 #endif
  663 };

댓글 없음:

댓글 쓰기