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

Compel: use (rt)-vdso/vvar for timings in PIE blobs #346

Closed
0x7f454c46 opened this issue Jun 29, 2017 · 0 comments
Closed

Compel: use (rt)-vdso/vvar for timings in PIE blobs #346

0x7f454c46 opened this issue Jun 29, 2017 · 0 comments

Comments

@0x7f454c46
Copy link
Member

In PIE blobs (parasite/restorer) we use timings for logs - check sbuf_log_init():

	/*
	 * Format:
	 *
	 * (time)pie: pid: string-itself
	 */

This is all done in that function with raw syscalls:

		sys_gettimeofday(&now, NULL);
		timediff(&start, &now);

If we omit calling raw syscalls and use vdso for the purpose of logging, that will eliminate as much as one-syscall-per-PIE-message. Getting time without switching to kernel will speed up C/R, keeping logs as informative as they were.

During restore (in the restorer blob) - we know the position of vvar/vdso pair and vdso-symtable.
So, it should be simple to use gettimeofday from vvar page, calling vdso-provided function.

On the dumping - it's a bit more complex. We have vdso-symtable parsed in criu, but yet don't know if seized task has the same vdso-symtable. So, as we'll parse the symtable afterward anyway for dumping needs, this could be done during parasite's initialization and then using gettimeofday from seized task.

0x7f454c46 added a commit to 0x7f454c46/criu that referenced this issue Jun 14, 2019
Omit calling raw syscalls and use vdso for the purpose of logging.
That will eliminate as much as one-syscall-per-PIE-message.
Getting time without switching to kernel will speed up C/R,
keeping logs as informative as they were.

Fixes: checkpoint-restore#346

Signed-off-by: Dmitry Safonov <dima@arista.com>
0x7f454c46 added a commit to 0x7f454c46/criu that referenced this issue Jun 19, 2019
Omit calling raw syscalls and use vdso for the purpose of logging.
That will eliminate as much as one-syscall-per-PIE-message.
Getting time without switching to kernel will speed up C/R,
keeping logs as informative as they were.

Fixes: checkpoint-restore#346

Signed-off-by: Dmitry Safonov <dima@arista.com>
0x7f454c46 added a commit to 0x7f454c46/criu that referenced this issue Jul 25, 2019
Omit calling raw syscalls and use vdso for the purpose of logging.
That will eliminate as much as one-syscall-per-PIE-message.
Getting time without switching to kernel will speed up C/R,
keeping logs as informative as they were.

Fixes: checkpoint-restore#346

Signed-off-by: Dmitry Safonov <dima@arista.com>
0x7f454c46 added a commit to 0x7f454c46/criu that referenced this issue Jul 25, 2019
Omit calling raw syscalls and use vdso for the purpose of logging.
That will eliminate as much as one-syscall-per-PIE-message.
Getting time without switching to kernel will speed up C/R,
keeping logs as informative as they were.

Fixes: checkpoint-restore#346

I haven't enabled vdso timings for ia32 applications as it needs more
changes and complexity.. Maybe later.

Signed-off-by: Dmitry Safonov <dima@arista.com>
0x7f454c46 added a commit to 0x7f454c46/criu that referenced this issue Jul 25, 2019
Omit calling raw syscalls and use vdso for the purpose of logging.
That will eliminate as much as one-syscall-per-PIE-message.
Getting time without switching to kernel will speed up C/R,
keeping logs as informative as they were.

Fixes: checkpoint-restore#346

I haven't enabled vdso timings for ia32 applications as it needs more
changes and complexity.. Maybe later.

Signed-off-by: Dmitry Safonov <dima@arista.com>
criupatchwork pushed a commit to criupatchwork/criu that referenced this issue Jul 25, 2019
Omit calling raw syscalls and use vdso for the purpose of logging.
That will eliminate as much as one-syscall-per-PIE-message.
Getting time without switching to kernel will speed up C/R,
keeping logs as informative as they were.

Fixes: checkpoint-restore#346

I haven't enabled vdso timings for ia32 applications as it needs more
changes and complexity.. Maybe later.

Signed-off-by: Dmitry Safonov <dima@arista.com>
@avagin avagin closed this as completed in f12a0f0 Aug 6, 2019
avagin pushed a commit to avagin/criu that referenced this issue Sep 7, 2019
Omit calling raw syscalls and use vdso for the purpose of logging.
That will eliminate as much as one-syscall-per-PIE-message.
Getting time without switching to kernel will speed up C/R,
keeping logs as informative as they were.

Fixes: checkpoint-restore#346

I haven't enabled vdso timings for ia32 applications as it needs more
changes and complexity.. Maybe later.

Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Andrei Vagin <avagin@gmail.com>
avagin pushed a commit to avagin/criu that referenced this issue Sep 7, 2019
Omit calling raw syscalls and use vdso for the purpose of logging.
That will eliminate as much as one-syscall-per-PIE-message.
Getting time without switching to kernel will speed up C/R,
keeping logs as informative as they were.

Fixes: checkpoint-restore#346

I haven't enabled vdso timings for ia32 applications as it needs more
changes and complexity.. Maybe later.

Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Andrei Vagin <avagin@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants