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. cocos2d源码剖析

    1. TextureAtlas http://www.cocoachina.com/bbs/read.php?tid-311439-keyword-TextureAtlas.html 2. Label ...

  2. javascript权威指南第6版学习笔记

    javascript权威指南第6版学习笔记 javascript数组.函数是特殊对象 看一点少一点. 3.1.4 hello.js内容是 var x=.3-.2;var y=.2-.1 console ...

  3. LayoutInflater类详解

    http://www.cnblogs.com/top5/archive/2012/05/04/2482328.html   在实际开发中LayoutInflater这个类还是非常有用的,它的作用类似于 ...

  4. 关于百度 UEditor的使用

    1.文件路径的配置: 注意:在页面上需要指定editor文件所在的路径,否则报错 后面有时间,再说说 kindEditor和  bootstrap3的summernote的  Editor,  fck ...

  5. 设置linux服务器定时与时间服务器同步

    在一些大公司经常出现这样一个情况:公司或一些机关单位的内部业务系统的应用服务器以及数据都是做的多机集群部署而且基本都是linux系统,而且都是内部网,不与外网通讯的.这样经常就会出现一个情况,我发送任 ...

  6. javascript DOM小结

    一:定义 dom:文档对象模型. dom是针对HTML和XML文档的一个API.dom描绘了一个层次化的节点树,允许开发人员添加.移除.修改页面的某一部分. 1:childNodes(返回当前节点的子 ...

  7. 扩展欧几里得算法(extended Euclidean algorithm)的一个常犯错误

    int exGcd(int x,int y,int& a,int& b) //ax+by=gcd(x,y) { ; b=; return x; } int res=exGcd(y,x% ...

  8. pthread_setcanceltype 线程取消

    取消线程: (1)一个线程可以调用pthread_cancel来取消另一个线程.    (2)被取消的线程需要被join来释放资源.    (3)被取消的线程的返回值为PTHREAD_CANCELED ...

  9. javascript——集合类

    /** * Created by Administrator on 2015/4/14. */ function Set() { this.values = {}; this.n = 0; this. ...

  10. Linq查询IEnumerable与IQueryable

    class Program { static void Main(string[] args) { System.Diagnostics.Stopwatch stp = new Stopwatch() ...