Skip to content

修复jiffy时钟过快问题,启用gettimeofday测试,修改mount测试#680

Merged
fslongjin merged 27 commits intoDragonOS-Community:masterfrom
xiaolin2004:fix_time
Apr 4, 2024
Merged

修复jiffy时钟过快问题,启用gettimeofday测试,修改mount测试#680
fslongjin merged 27 commits intoDragonOS-Community:masterfrom
xiaolin2004:fix_time

Conversation

@xiaolin2004
Copy link
Collaborator

No description provided.

@dragonosbot
Copy link
Contributor

@xiaolin2004: no appropriate reviewer found, use r? to override

@dragonosbot dragonosbot added the S-等待审查 Status: 等待assignee以及相关方的审查。 label Apr 1, 2024
pub static ref DEFAULT_CLOCK: Arc<ClocksourceJiffies> = ClocksourceJiffies::new();
}
pub const CLOCK_TICK_RATE: u32 = HZ as u32 * 100000;
pub const CLOCK_TICK_RATE: u32 = 1193182;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为什么把这个修改为这个数字?请注意,HZ是可以调整的。

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不应该写成一个死的数字,而是应该定义应该定义一个全局变量。然后将其与这个地方 ,还有hpet之类的时钟源的频率关联起来。

你这里写成固定值的话,要是我们想修改jiffies频率,就会出现错误。

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修改了HZ之后,这个修改会通过LATCH传递,完成对jiffy频率的控制

@fslongjin
Copy link
Member

@dragonosbot author

@dragonosbot dragonosbot added S-等待作者修改 Status: 这正在等待作者的一些操作(例如代码更改或更多信息)。 and removed S-等待审查 Status: 等待assignee以及相关方的审查。 labels Apr 1, 2024
@fslongjin
Copy link
Member

这样还没跟HPET关联上。

/// 最大能接受的误差大小
pub const WATCHDOG_THRESHOLD: u32 = NSEC_PER_SEC >> 4;

pub const PIT_TICK_RATE: u32 = 1193182;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我看了linux相关的内容,应该是错误的这样写。因为我们没有使用PIT,这个会导致vruntime有问题。

2. 修复墙上时间同步错误的问题
3. 启用时间watch dog.
@dragonosbot dragonosbot added O-riscv64 Target: riscv64 O-x86_64 Target: x86_64 T-driver Relevant to the driver team, which will review and decide on the PR/issue. labels Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-riscv64 Target: riscv64 O-x86_64 Target: x86_64 S-等待作者修改 Status: 这正在等待作者的一些操作(例如代码更改或更多信息)。 T-driver Relevant to the driver team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants