<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      【linux kernel】 softirq 軟中斷討論

      歡迎轉載,轉載時需保留作者信息,謝謝。

      郵箱:tangzhongp@163.com

      博客園地址:http://www.rzrgm.cn/embedded-tzp

      Csdn博客地址:http://blog.csdn.net/xiayulewa

      早看到這篇文章,就不寫了,懶:

       Linux中斷(interrupt)子系統之五:軟件中斷(softIRQ)http://blog.csdn.net/droidphone/article/details/7518428

      1.1.  數據結構

      struct softirq_action

      {

          void    (*action)(struct softirq_action *);

      };

       

      2  static struct softirq_action softirq_vec[NR_SOFTIRQS] __cacheline_aligned_in_smp;

       

      softirq_vec是一個struct softirq_action數組,使用open_softirq注冊

       

      Softirq.c (src\kernel):52 中:

      2  irq_cpustat_t irq_stat[NR_CPUS] ____cacheline_aligned;

      其操作:raise_softirq_irqoff→or_softirq_pending置位bitmapirq_stat[cpu].__softirq_pending

       

      1.2.  軟中斷注冊

       

      void open_softirq(int nr, void (*action)(struct softirq_action *))

      {

          softirq_vec[nr].action = action;

      }

      不是鏈表結構。

       

      可被注冊的有

      enum

      {

          HI_SOFTIRQ=0,

          TIMER_SOFTIRQ,

          NET_TX_SOFTIRQ,

          NET_RX_SOFTIRQ,

          BLOCK_SOFTIRQ,

          BLOCK_IOPOLL_SOFTIRQ,

          TASKLET_SOFTIRQ,

          SCHED_SOFTIRQ,

          HRTIMER_SOFTIRQ,

          RCU_SOFTIRQ,    /* Preferable RCU should always be the last softirq */

       

          NR_SOFTIRQS

      };

       

      如在softirq_init中有open_softirq(TASKLET_SOFTIRQ, tasklet_action);

      這說明 tasklet是被放入軟中斷中執行的。

      1.3.  軟中斷執行流程

      1.3.1.   路徑1

      open_softirq注冊→raise_softirq→raise_softirq_irqoff→raise_softirq_irqoff→wakeup_softirqd

      wakeup_softirqd中喚醒ksoftirqd進程,

       

      static struct smp_hotplug_thread softirq_threads = {

          .store          = &ksoftirqd,

          .thread_should_run  = ksoftirqd_should_run,

          .thread_fn      = run_ksoftirqd,

          .thread_comm        = "ksoftirqd/%u",

      };

       

      執行.thread_fn = run_ksoftirqd  →__do_softirq

      _do_softirq中有

      h = softirq_vec;

      ……………………………

      h->action(h); 即為具體注冊函數

      ……………………………

       

      Ksoftirqd:是個線程, 其流程為

      start_kernelrest_initkernel_initkernel_init_freeable

      do_basic_setup→do_initcalls→spawn_ksoftirqd

      →smpboot_register_percpu_thread(&softirq_threads)

       

       

      1.3.2.   路徑2

      open_softirq注冊→raise_softirq→raise_softirq_irqoff→raise_softirq_irqoff→irq_exit(在中斷退出時執行)→invoke_softirq→do_softirq(wakeup_softirqd) →__do_softirq→ h->action(h); 即為具體注冊函數

       

       

      posted on 2015-04-23 22:42  embedded_linux  閱讀(443)  評論(0)    收藏  舉報

      主站蜘蛛池模板: 国产精品亚洲精品日韩已满十八小| 兴和县| 欧美xxxxhd高清| 99久久婷婷国产综合精品| 亚洲午夜久久久久久噜噜噜 | 国产乱妇乱子视频在播放| 99国产欧美久久久精品蜜芽| 亚洲精品久久麻豆蜜桃| 亚洲一区二区精品动漫| 麻豆人人妻人人妻人人片av| 乱人伦人妻中文字幕在线| 欧美嫩交一区二区三区| 国产AV巨作丝袜秘书| 国产第一区二区三区精品| 米脂县| 综合激情网一区二区三区| 久久人人97超碰爱香蕉| 免费超爽大片黄| 丰满少妇高潮无套内谢| 亚洲avav天堂av在线网爱情| 国产成人精品久久性色av| 92成人午夜福利一区二区| 精品综合久久久久久97| 国产桃色在线成免费视频| 内射一区二区三区四区| 日韩精品国产二区三区| 南昌县| 一区二区三区黄色一级片| 国产精品女同一区三区五区| 亚洲顶级裸体av片| 亚洲国产在一区二区三区| 国产精品高清中文字幕| 国产精品久久无中文字幕| 北流市| 亚洲悠悠色综合中文字幕| 国产成人综合欧美精品久久| 中文字幕亚洲综合第一页| 日本精品网| 久久国产自偷自偷免费一区| 麻豆最新国产AV原创精品| 久久精品蜜芽亚洲国产AV|