Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync LKL system clock with host system clock on boot #158

Closed
Rondom opened this issue May 25, 2016 · 5 comments · Fixed by #161
Closed

Sync LKL system clock with host system clock on boot #158

Rondom opened this issue May 25, 2016 · 5 comments · Fixed by #161

Comments

@Rondom
Copy link

Rondom commented May 25, 2016

Most Linux systems set the system clock from a hardware clock on boot using hwclock from util-linux.
I am wondering if we can provide this functionality within LKL as well by setting the LKL system clock to the host's system clock.

For many applications the system time inside LKL does not matter, but for lklfuse (and probably also cptofs) it does. Timestamps of files are wrong with the current implementation because the system clock defaults to the unix epoch start if it has not been set explicitly.

@pscollins
Copy link
Member

I wonder if this is why running ping under hijack always complains about going back in time?

@ghost
Copy link

ghost commented May 26, 2016

Can you please test PR #159 ? My basic tests seems to work, but please give it a try with your usecase as well.

@Rondom
Copy link
Author

Rondom commented May 26, 2016

I tested the patch (see PR-Comment).

Btw, the lkl_ops.time is missing from the docstring in arch/lkl/include/uapi/asm/host_ops.h

@thehajime
Copy link
Member

I wonder if this is why running ping under hijack always complains about going back in time?

I guess the following is somehow related; CLOCK_MONOTONIC vs CLOCK_REALTIME.

libos-nuse/linux-libos-tools#16

@ghost
Copy link

ghost commented May 27, 2016

Fixed by #159

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants