kernel解读之 pick_next_rt_entity
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的更多相关文章
- 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 ...
- 如何解读Linux Kernel OOPS信息
OOPS信息解读 root@firefly:~/mnt/module# insmod oops_module.ko [ 867.140514] Unable to handle kernel NULL ...
- The Linux Kernel 4.15.0官方文档内核语言风格解读(留)
https://www.kernel.org/doc/html/v4.15/translations/zh_CN/coding-style.html 1.缩进 制表符是 8 个字符,所以缩进也是 8 ...
- Blind Super-Resolution Kernel Estimation using an Internal-GAN 论文解读
背景与思路来源 目前 SR 模型中合成 LR 使用的模糊核问题 目前大多数 SR 的 model 都是用的合成下采样图片来进行训练的,而这些合成的图片常常使用的是 MATLAB 里面的 imresiz ...
- 论文解读《Deep Plug-and-Play Super-Resolution for Arbitrary Blur Kernel》
Deep Plug-and-Play Super-Resolution for Arbitrary Blur Kernels: 一旦退化模型被定义,下一步就是使用公式表示能量函数(energy fun ...
- mysql之show engine innodb status解读
注:以下内容为根据<高性能mysql第三版>和<mysql技术内幕innodb存储引擎>的innodb status部分的个人理解,如果有错误,还望指正!! innodb存 ...
- 我就是认真:Linux SWAP 深度解读(必须收藏)
我就是认真:Linux SWAP 深度解读(必须收藏) http://mp.weixin.qq.com/s?__biz=MzA4Nzg5Nzc5OA==&mid=2651660097& ...
- show engine innodb status解读
xiaoboluo768 注:以下内容为根据<高性能mysql第三版>和<mysql技术内幕innodb存储引擎>的innodb status部分的个人理解,如果有错误,还 ...
- 专家解读Linux操作系统内核中的GCC特性
专家解读Linux操作系统内核中的GCC特性 Linux内核使用GNU Compiler Collection (GCC)套件的几个特殊功能.这些功能包括提供快捷方式和简化以及向编译器提供优化提示 ...
随机推荐
- EsayUI datagrid 刷新问题
最近使用esayui 实现前台界面,在对父页面中datagrid列表项进行操作后,如果操作子页面是依附于父页面弹出的窗体,那么调用parent.$("#grid").datagri ...
- windows10UWP:Segoe MDL2 图标指南
windows10 UWP 开发中,图标的使用非常广泛.为此,微软建议大家使用 Segoe MDL2 Assets 字体来获取图标.Segoe MDL2 Assets 包括了哪里图标,微软在 http ...
- 从创建webservice到发布webservice的一些相关总结
最近做了一个web服务,开始什么也不懂,就在网上到处找,对于刚毕业的我,感觉没用实际代码经过自己的手写出来,看什么都一头雾水,然后就看到很多人说webservice已经融入WCF..然后就先创建了WC ...
- C# 内存管理优化畅想(二)---- 巧用堆栈
这个优化方法比较易懂,就是对于仅在方法内部用到的对象,不再分配在堆上,而是直接在栈上分配,方法结束后立即回收,这将大大减轻GC的压力. 其实,这个优化方法就是java里的逃逸分析,不知为何.net里没 ...
- Echarts使用随笔(2)-Echarts中mapType and data
本文出处:http://blog.csdn.net/chenxiaodan_danny/article/details/39081071 series : [ { ...
- 某PHP代码加密
<?php /* 本程序已加密: 2014-11-15 10:10:11 */ xs_run('JGxosS9QplmqLA6qjYo/LiX5ecUe0DH7p42Ww/Mdkf5/ybZDs ...
- printf 缓冲区问题
突然发现printf的问题,看了这个很有意思,学习一下 转自:http://blog.csdn.net/shanshanpt/article/details/7385649 昨天在做Linux实验的时 ...
- 【HDU2815】【拓展BSGS】Mod Tree
Problem Description The picture indicates a tree, every node has 2 children. The depth of the nod ...
- 【转】 C语言自增自减运算符深入剖析
转自:http://bbs.csdn.net/topics/330189207 C语言的自增++,自减--运算符对于初学者来说一直都是个难题,甚至很多老手也会产生困惑,最近我在网上看到一个问题:#in ...
- linux 监控系统缓存和cpu
a=`free |head -n 2 |tail -n 1 |awk '{print $7}'`if [ $a -ge 900000 ];then sync && echo 1 ...