153 Star 690 Fork 534

OpenHarmony / kernel_liteos_m

 / 详情

提高调度tick响应的精度,减小延时的时间长度与误差重合时的误差影响

Done
Bug member
Opened this issue  
2021-06-30 11:07

【模块名_概率】简要描述:
提高调度tick响应的精度,减小延时的时间长度与误差重合时的误差影响:
周期软件定时器定时时长与tick大小重合时,由于tick响应的误差也是一个tick,会导致两个周期响应时间概率重合,合并为一个周期,造成丢周期的问题

Comments (1)

zhushengle created缺陷
zhushengle set related repository to OpenHarmony/kernel_liteos_m
zhushengle changed issue state from 待办的 to 修复中
zhushengle set assignee to zhushengle
zhushengle throughopenharmony/kernel_liteos_m Pull Request !247 changed issue state from 修复中 to 已完成
Expand operation logs

fix: tick 动态化计算优化,减小中断执行时间对系统总体时间的影响,保证软件定时器的响应精度。

方案描述:
1.周期软件定时器超时添加一个startTime字段,用于记录当前软件定时器的开始计时的时间,
在定时器响应时,开始时间修改为上一次响应的结束时间(消除了中断执行时间对软件定时器
的影响)。
2. 在执行tick中断的过程当中,持有tick动态计算锁,保证在该过程中不会触发tick周期
的计算,在tick中断结束时统一计算设置。 --- 提升tick中断的执行效率
3. 在设置tick周期时,减掉tick中断执行的时间,减小周期动态化带来的时间误差
4.新增LOSCFG_BASE_CORE_TICK_PER_SECOND_MINI配置宏,用于配置tick中断的最小响应精度
Close #I3YGP1:提高调度tick响应的精度,减小延时的时间长度与误差重合时的误差影响

Signed-off-by: zhushengle zhushengle@huawei.com
Change-Id: Ia53e4accce497bce870557c2c3387ce51fa3fed3

-----来自 commit 2118c84

Sign in to comment

Status
Assignees
Projects
Milestones
Pull Requests
Successfully merging a pull request will close this issue.
Branches
Planed to start   -   Planed to end
-
Top level
Priority
Duration (hours)
参与者(1)
7989059 star rain 1599750608
C
1
https://gitee.com/openharmony/kernel_liteos_m.git
git@gitee.com:openharmony/kernel_liteos_m.git
openharmony
kernel_liteos_m
kernel_liteos_m

Search