money_yuan
码龄8年
关注
提问 私信
  • 博客:509,877
    社区:4,026
    513,903
    总访问量
  • 80
    原创
  • 2,263,585
    排名
  • 101
    粉丝
  • 1
    铁粉

个人简介:多多学习,努力赚钱,给家人一个好的生活

IP属地以运营商信息为准,境内显示到省(区、市),境外显示到国家(地区)
IP 属地:广东省
  • 加入CSDN时间: 2016-08-01
博客简介:

勿于浮沙筑高台

查看详细资料
个人成就
  • 获得145次点赞
  • 内容获得23次评论
  • 获得722次收藏
  • 代码片获得366次分享
创作历程
  • 31篇
    2020年
  • 55篇
    2019年
  • 119篇
    2018年
  • 29篇
    2017年
  • 4篇
    2016年
成就勋章
TA的专栏
  • 内核调度
    4篇
  • 读书笔记
  • 基础知识
    40篇
  • features
    14篇
  • 计算机基础
    22篇
  • linux内核
    57篇
  • AI
    60篇
  • 人生提升
创作活动更多

AI大模型如何赋能电商行业,引领变革?

如何使用AI技术实现购物推荐、会员分类、商品定价等方面的创新应用?如何运用AI技术提高电商平台的销售效率和用户体验呢?欢迎分享您的看法

175人参与 去创作
  • 最近
  • 文章
  • 代码仓
  • 资源
  • 问答
  • 帖子
  • 视频
  • 课程
  • 关注/订阅/互动
  • 收藏
搜TA的内容
搜索 取消

【数据结构】【task_group】

task_group/* task group related information */struct task_group { /* 用于进程找到其所属进程组结构 */ struct cgroup_subsys_state css;#ifdef CONFIG_FAIR_GROUP_SCHED /* schedulable entities of this group on each cpu */ /* CFS调度器的进程组变量,在 alloc_fair_sched_group() 中
原创
发布博客 2020.07.22 ·
982 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【调度器初始化】【sched_init】

0号进程初始化调度器相关的结构体,并将0号进程调度类变换为idle_sched_class调度类Kernel_init------------》Sched_init​#ifdef CONFIG_CGROUP_SCHED/* * Default task group. * Every task in system belongs to this group at bootup. */struct task_group root_task_group;LIST_HEAD(task_g
原创
发布博客 2020.07.22 ·
3119 阅读 ·
1 点赞 ·
0 评论 ·
2 收藏

【内核调度、调度组】【bandwidth throttle】

cfs bandwidth是针对task_group的配置,一个task_group的bandwidth使用一个struct cfs_bandwidth *cfs_b数据结构来控制struct cfs_bandwidthstruct cfs_bandwidth {#ifdef CONFIG_CFS_BANDWIDTH raw_spinlock_t lock; /*cfs bandwidth的监控周期,默认值是default_cfs_period() 0.1s */ ktime_.
转载
发布博客 2020.07.22 ·
949 阅读 ·
0 点赞 ·
0 评论 ·
2 收藏

【内核调度、EAS】【cpu boost和task boost的区别和联系】

cpu boostunsigned longboosted_cpu_util(int cpu, unsigned long util){ long margin; margin = schedtune_cpu_margin(util, cpu); trace_sched_boost_cpu(cpu, util, margin); return util + margin;}task的boost=util+marginstatic inline intschedtune_
转载
发布博客 2020.07.22 ·
1952 阅读 ·
0 点赞 ·
0 评论 ·
3 收藏

【内核调度、调度组】【struct sched_group】

struct sched_groupstruct sched_group { struct sched_group *next; /* Must be a circular list */ atomic_t ref; unsigned int group_weight; struct sched_group_capacity *sgc; int asym_prefer_cpu; /* cpu of highest priority in group */ const struct sc
原创
发布博客 2020.07.21 ·
478 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【内核调度、负载均衡】【find_energy_efficient_cpu】

get_eenv/* * get_eenv - reset the eenv struct cached for this CPU * * When the eenv is returned, it is configured to do * energy calculations for the maximum number of CPUs * the task can be placed on. The prev_cpu entry is * filled in here. Calle
原创
发布博客 2020.07.21 ·
2143 阅读 ·
0 点赞 ·
0 评论 ·
1 收藏

【内核调度】【休眠进程的唤醒】【wake_up_process】

wake_up_process一般当队列里面为空的时候,核心调度器(是否是核心调度器还需要后续去confirm)会在已经睡眠的task中通过调用wake_up_process函数将其唤醒,然后选择合适的cpu来运行/** * wake_up_process - Wake up a specific process * @p: The process to be woken up. * * Attempt to wake up the nominated process and move i
原创
发布博客 2020.07.21 ·
4176 阅读 ·
0 点赞 ·
0 评论 ·
5 收藏

【负载均衡、负载计算】【propagate_entity_load_avg】

对于组调度而言,需要传播负载的变化到整个cfs列表里面。propagate_entity_load_avg就负责传播组调度负载的变化propagate_entity_load_avg/* Update task and its cfs_rq load average */static inline int propagate_entity_load_avg(struct sched_entity *se){ struct cfs_rq *cfs_rq; //只有group下面才有cfs_r
原创
发布博客 2020.07.21 ·
682 阅读 ·
0 点赞 ·
1 评论 ·
0 收藏

【内核调度、负载均衡】【entity_tick】

在scheduler_tick函数中会调用task_tick函数,具体到fair class,他的入口函数为task_tick_fair/* * scheduler tick hitting a task of our scheduling class: */ /* 获取到当前进程curr所在的调度实体 */static void task_tick_fair(struct rq *rq, struct task_struct *curr, int queued){ struct
原创
发布博客 2020.07.20 ·
478 阅读 ·
0 点赞 ·
0 评论 ·
1 收藏

【内核调度、负载计算】【calc_global_load_tick】

calc_global_load_tick是计算整个系统的负载,这个函数在scheduler_tick中被周期性的调用calc_global_load_tick/* * Called from scheduler_tick() to periodically update this CPU's * active count. */void calc_global_load_tick(struct rq *this_rq){ long delta; if (time_before(j
原创
发布博客 2020.07.20 ·
672 阅读 ·
0 点赞 ·
0 评论 ·
1 收藏

【内核调度、负载计算】【WALT】【walt_update_task_ravg】

walt_update_task_ravg/* Reflect task activity on its demand and cpu's busy time statistics */void walt_update_task_ravg(struct task_struct *p, struct rq *rq, int event, u64 wallclock, u64 irqtime){ u64 old_window_start; if (walt_disabled || !
原创
发布博客 2020.07.20 ·
1553 阅读 ·
0 点赞 ·
1 评论 ·
1 收藏

【内核调度、负载计算】【WALT】【update_cpu_busy_time】

1、获取初始化变量 new_window = mark_start < window_start; if (new_window) {//包含多个窗口 nr_full_windows = div64_u64((window_start - mark_start), window_size); if (p->ravg.active_windows < USHRT_MAX) p->ravg.active_windows++; } /* Hand..
原创
发布博客 2020.07.20 ·
1435 阅读 ·
0 点赞 ·
0 评论 ·
2 收藏

【内核调度、hotplug进程迁移】【migrate_tasks】

在cpu_down()时,需要调用migration_call() -> migrate_tasks()把cpu上所有runnable进程迁移到其他cpu;在cpu_up()时,并不需要在函数中迁移进程,直接等待负载均衡算法的迁移。migrate_tasks需要注意的是被迁移的task的dst cpu很有可能都是不一样的。/* * Migrate all tasks from the rq, sleeping tasks will be migrated by * try_to_wa
原创
发布博客 2020.07.16 ·
1410 阅读 ·
0 点赞 ·
0 评论 ·
2 收藏

【内核调度、负载均衡】【select_task_rq_fair】

在新建一个task或者block的task被唤醒的时候,也会执行负载均衡,调用的函数是select_task_rq_fair和内核周期性调度相似(寻找最忙的cpu上的任务,然后把该任务pull过来执行。或者从最忙的cpu上将当时正在执行的任务停掉,然后放到local cpu上去执行)。只是他寻找的是最idlest的cpu来运行taskselect_task_rq_fair/* * select_task_rq_fair: Select target runqueue for the waki
原创
发布博客 2020.07.16 ·
1592 阅读 ·
0 点赞 ·
0 评论 ·
4 收藏

【内核调度、负载均衡】【scheduler_tick】

scheduler_tick系统的软中断触发会周期性的调度scheduler_tick函数/* * This function gets called by the timer code, with HZ frequency. * We call it with interrupts disabled. */void scheduler_tick(void){ int cpu = smp_processor_id(); struct rq *rq = cpu_rq(cpu); st
原创
发布博客 2020.07.16 ·
919 阅读 ·
0 点赞 ·
0 评论 ·
3 收藏

【内核调度、负载计算】【cpu_load_update_active】

之前看了entity_load和cfs_rq的负载的计算,他们的核心code都是一样的,至于具体差别后面有时间再去看,现在来看看cpu级别的负载的计算cpu_load_update_activecpu级别的负载的计算主要是涉及到一个数组/* * Called from scheduler_tick() */void cpu_load_update_active(struct rq *this_rq){ unsigned long load = weighted_cpuload(thi
原创
发布博客 2020.07.16 ·
795 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【内核调度、负载计算】【update_load_avg】

___update_load_avg之前版本的kernel没有accumulate_sum函数,而是直接将这部分放在本函数内执行。accumulate_sum详见https://blog.csdn.net/feifei_csdn/article/details/103814876主要是对time进行衰减/* * We can represent the historical contribution to runnable average as the * coefficients o
原创
发布博客 2020.07.16 ·
1312 阅读 ·
0 点赞 ·
0 评论 ·
1 收藏

【内核调度、负载均衡】【detach_tasks】

detach_tasks在load balance中会将busiest cpu上的task detach掉,然后atach在local cpu上。返回值为detach的task的数量/* * detach_tasks() -- tries to detach up to imbalance weighted load from * busiest_rq, as part of a balancing operation(操作) within domain "sd". * * Returns
原创
发布博客 2020.07.15 ·
1054 阅读 ·
0 点赞 ·
0 评论 ·
2 收藏

【内核调度、负载均衡】【load_balance】

pull taskpull task 是当前的cpu将busiest cpu上的task拉到自己身上来执行。/* * Check this_cpu to ensure it is balanced within domain. Attempt to move * tasks if there is an imbalance. */ // 找出负载最重的cpu,将busiest cpu上的部分task迁移到local cpu上。 // 返回的是迁移的task的数量static int l
原创
发布博客 2020.07.15 ·
1293 阅读 ·
0 点赞 ·
0 评论 ·
3 收藏

【内核调度、负载均衡】【find_busiest_queue】

在最繁忙的group中去寻找最繁忙的cpufind_busiest_queue/* * find_busiest_queue - find the busiest runqueue among the cpus in group. */ //冒泡排序找到group内最忙的rqstatic struct rq *find_busiest_queue(struct lb_env *env, struct sched_group *group){ struct rq *bu
原创
发布博客 2020.07.15 ·
385 阅读 ·
0 点赞 ·
0 评论 ·
1 收藏
加载更多