From: Stanislav Kinsbursky <skinsbursky@parallels.com>
To: "tglx@linutronix.de" <tglx@linutronix.de>,
"devel@openvz.org" <devel@openvz.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Pavel Emelianov <xemul@parallels.com>
Subject: [RFC] Posix timers improvements, requied for CRIU project
Date: Tue, 9 Oct 2012 19:18:23 +0400 [thread overview]
Message-ID: <5074403F.9020707@parallels.com> (raw)
Hi.
We would like to make CRIU able to migrate posix timers.
Currently we require additional info, which have to be provided by kernel.
In particular, it's:
1) Timers id's.
2) Timer clock (gained by id).
3) Timer sigevent structure.
4) Timer current overrun status (not the last one).
We are not sure, how to implement such support properly.
Right now we are considering two approaches of posix timers interface update
(for dump):
1) First one it to use /proc filesystem to provide posix timers data by task
(something like /proc/<pid>/posix_timers)
2) Second one is to add new system calls like:
int timer_getnext(int start_id); // return next timer id after start-id
int timer_getclock(timer_t id, cclock_t *clock); // return clock
int timer_getsigevent(timer_t id, struct sigevent *evp); // return sigevent
int timer_getoverrun_cur(timer_t id, int *overrun); // current overrun
Of course, both approaches can be combined.
Also, we require a syscall to set desired overrun (on restore):
int timer_setoverrun(timer_t id, int *overrun);
Moreover, we need to make posix timer id to be allocated per task (not globally)
to make sure, that we can restore timer with desired id (desired id can be
passed to timer_create() in timerid variable).
Our current idea is to replace idr by hash table, where
"per_process_struct_signal + per_process_id" will be the key.
We would greatly appreciate any comments or suggestions.
Thanks.
--
Best regards,
Stanislav Kinsbursky
reply other threads:[~2012-10-09 15:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5074403F.9020707@parallels.com \
--to=skinsbursky@parallels.com \
--cc=devel@openvz.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=xemul@parallels.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox