1328 static struct sched_rt_entity *pick_next_rt_entity(struct rq *rq,
1329 struct rt_rq *rt_rq)
1330 {
1331 struct rt_prio_array *array = &rt_rq->active;
       //取出rt_rq的priority数组,一个runqueue数组,每个优先级别有一个。
       //struct rt_prio_array active;
       //struct list_head queue[MAX_RT_PRIO] 1332 struct sched_rt_entity *next = NULL;1333
        struct list_head *queue; 1334 int idx;
1335
1336 idx = sched_find_first_bit(array->bitmap);
        //sched_find_first_bit()寻找第一个非0位
1337 BUG_ON(idx >= MAX_RT_PRIO);
        //如果idx大于MAX_RT_PRIO, rasie error
1338
1339 queue = array->queue + idx;
        //非常漂亮的用法,直接取queue[idx]中的queue(list_head)
1340 next = list_entry(queue->next, struct sched_rt_entity, run_list);
        //取queue的队首元素next,注意queue是dummy head,取出sched_rt_entity. 1341
1342 return next;
1343 }

kernel解读之 pick_next_rt_entity的更多相关文章

  1. qcom wlan kernel 解读 WCNSS_qcom_cfg.ini 文件

    CORE/HDD/src/wlan_hdd_main.c 模块初始化: static int __init hdd_module_init ( void) { return hdd_driver_in ...

  2. 如何解读Linux Kernel OOPS信息

    OOPS信息解读 root@firefly:~/mnt/module# insmod oops_module.ko [ 867.140514] Unable to handle kernel NULL ...

  3. The Linux Kernel 4.15.0官方文档内核语言风格解读(留)

    https://www.kernel.org/doc/html/v4.15/translations/zh_CN/coding-style.html 1.缩进 制表符是 8 个字符,所以缩进也是 8 ...

  4. Blind Super-Resolution Kernel Estimation using an Internal-GAN 论文解读

    背景与思路来源 目前 SR 模型中合成 LR 使用的模糊核问题 目前大多数 SR 的 model 都是用的合成下采样图片来进行训练的,而这些合成的图片常常使用的是 MATLAB 里面的 imresiz ...

  5. 论文解读《Deep Plug-and-Play Super-Resolution for Arbitrary Blur Kernel》

    Deep Plug-and-Play Super-Resolution for Arbitrary Blur Kernels: 一旦退化模型被定义,下一步就是使用公式表示能量函数(energy fun ...

  6. mysql之show engine innodb status解读

    注:以下内容为根据<高性能mysql第三版>和<mysql技术内幕innodb存储引擎>的innodb status部分的个人理解,如果有错误,还望指正!!   innodb存 ...

  7. 我就是认真:Linux SWAP 深度解读(必须收藏)

    我就是认真:Linux SWAP 深度解读(必须收藏) http://mp.weixin.qq.com/s?__biz=MzA4Nzg5Nzc5OA==&mid=2651660097& ...

  8. show engine innodb status解读

    xiaoboluo768   注:以下内容为根据<高性能mysql第三版>和<mysql技术内幕innodb存储引擎>的innodb status部分的个人理解,如果有错误,还 ...

  9. 专家解读Linux操作系统内核中的GCC特性

    专家解读Linux操作系统内核中的GCC特性   Linux内核使用GNU Compiler Collection (GCC)套件的几个特殊功能.这些功能包括提供快捷方式和简化以及向编译器提供优化提示 ...

随机推荐

  1. tcmalloc源码剖析的资料

    1. https://seanhn.wordpress.com/2011/04/14/exploit-necromancy-in-tcmalloc-reviving-the-4-to-n-byte-o ...

  2. Google代码实验室

    https://code.google.com/p/google-styleguide/

  3. Ant学习笔记(1) 基础知识

    Ant Apache Ant 是一个基于 Java的构建工具. 下载Ant google.baidu.Windows用户下载zip格式.解压即可. Windows安装Ant Ant本质上是一个Java ...

  4. java之log4j的配置

    java之log4j的配置 log4j有很多的优点,用起来很方便,就是配置起来有些麻烦,下面我介绍一下log4j的配置方法. log4j是用来记录日志的. 软件的运行过程离不开日志.日志主要用来记录系 ...

  5. PHP 的try catch 报错捕获机制

    首先上代码: try { echo 'Never executed'; echo "<br>"; if(1<0){ echo 'end'; }else{ thro ...

  6. 表达式:使用API创建表达式树(3)

    一.DebugInfoExpression:发出或清除调试信息的序列点. 这允许调试器在调试时突出显示正确的源代码. static void Main(string[] args) { var asm ...

  7. js正则实现用户输入银行卡号的控制及格式化

    //js正则实现用户输入银行卡号的控制及格式化 <script language="javascript" type="text/javascript"& ...

  8. JavaScript Window Screen

    window.screen 对象包含有关用户屏幕的信息. Window Screen window.screen对象在编写时可以不使用 window 这个前缀. 一些属性: screen.availW ...

  9. 浅谈 trie树 及其实现

    定义:又称字典树,单词查找树或者前缀树,是一种用于快速检索的多叉树结构, 如英文字母的字典树是一个26叉树,数字的字典树是一个10叉树. 核心思想:是空间换时间.利用字符串的公共前缀来降低查询时间的开 ...

  10. 在CentOS 6.3中安装与配置JDK-7

    在CentOS 6.3中安装与配置JDK-7 来源:互联网 作者:佚名 时间:02-07 16:28:33 [大 中 小] 在CentOS-6.3中安装与配置JDK-7,有需要的朋友可以参考下 安装说 ...