blta

Results 5 issues of blta

[ refer to [关于时间片调度算法issue的分析与解决]( https://club.rt-thread.org/ask/article/b3b36a52556382b2.html) 之前提的一个 PR #5954, 记得当时群里好像讨论SMP兼容,最后不了了之。 但这个时间片也算一个严重bug,时间片和延时设置不好,会严重影响同优先级任务调度,一直放着也不好。 再基于第2套方案提交一个PR, 改动较小,这个合并了,我把 #5954关了 测试: - [x] stm32407,ch32v103 - [ ] SMP 改动较小,thread->stat检查也合理,理论上没啥影响,没有板子,暂未验证 ] 以下的内容不应该在提交PR时的message修改,修改下述message,PR会被直接关闭。请在提交PR后,浏览器查看PR并对以下检查项逐项check,没问题后逐条在页面上打钩。 The following content must not be...

bug
discussion
important
v4.1.1

[ #5949 新调度优化策略,测试版本 , 已在ch32v103, stm32f4disc1 上测试正常 smp ,signal 部分未测,暂不需合并 ] 以下的内容不应该在提交PR时的message修改,修改下述message,PR会被直接关闭。请在提交PR后,浏览器查看PR并对以下检查项逐项check,没问题后逐条在页面上打钩。 The following content must not be changed in the submitted PR message. Otherwise, the PR will be closed...

discussion
v4.1.1

``` to_thread = _scheduler_get_highest_priority_thread(&highest_ready_priority); if ((rt_current_thread->stat & RT_THREAD_STAT_MASK) == RT_THREAD_RUNNING) { if (rt_current_thread->current_priority < highest_ready_priority) { to_thread = rt_current_thread; } else if (rt_current_thread->current_priority == highest_ready_priority && (rt_current_thread->stat & RT_THREAD_STAT_YIELD_MASK) ==...

proposal

[ 当前因为超时,或者资源唤醒就会主动发起一次rt_schedule, 但有时新ready的任务的优先级并没有当前的高 这样就会进入rt_schedule: 关中断,获取highest_ready_priority,rt_list_entry得到highest_priority_thread,再一堆比较 一顿操作最后发现做了无用功,降低了系统的实时性和效率。 新的优化策略是修改rt_thread_resume: 恢复thread状态后,再比较优先级大小: ``` rt_err_t rt_thread_resume(rt_thread_t thread) { rt_base_t level; rt_err_t result = RT_EOK; extern rt_uint8_t rt_current_priority; ......... /* disable interrupt */ level = rt_hw_interrupt_disable();...

proposal

[ 最近再次研究了之前提交的PR #6232 ,发现存在不少问题和新的bug, 打个patch, 同时提供一下utest 具体信息,参考 [时间片调度算法issue解决后续及utest测试](https://club.rt-thread.org/ask/article/096fc4007ce5ec9f.html) 已在stm32f407disc1测试, SMP 正在研究怎么测试。 ] ### 当前拉取/合并请求的状态 Intent for your PR 必须选择一项 Choose one (Mandatory): - [ ] 本拉取/合并请求是一个草稿版本 This PR is for...

Status: waiting for test