From: Pavel Emelyanov <xemul@parallels.com>
To: Matthew Helsley <matt.helsley@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Michael Kerrisk <mtk.manpages@gmail.com>,
linux-api@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/3] posix timers: Extend kernel API to report more info about timers
Date: Thu, 21 Feb 2013 14:35:39 +0400 [thread overview]
Message-ID: <5125F87B.7020205@parallels.com> (raw)
In-Reply-To: <CA+RrjuURQTCP8yMa4nWxNQg=qxxsu6vrko2UVK4f8pFYbK6SYQ@mail.gmail.com>
On 02/21/2013 05:21 AM, Matthew Helsley wrote:
> On Thu, Feb 14, 2013 at 8:18 AM, Pavel Emelyanov <xemul@parallels.com> wrote:
>> Hi.
>>
>> I'm working on the checkpoint-restore project (http://criu.org), briefly
>> it's aim is to collect information about process' state and saving it so
>> that later it is possible to recreate the processes in the very same state
>> as they were, using the collected information.
>>
>> One part of the task's state is the posix timers that this task has created.
>> Currently kernel doesn't provide any API for getting information about
>> what timers are currently created by process and in which state they are.
>> I'd like to extend the posix timers API to provide more information about
>> timers.
>>
>> Another problem with timers is the timer ID. Currently IDs are generated
>> from global IDR and this makes it impossible to restore a timer from
>> the saved state in general, as the required ID may be already busy at the
>> time of restore.
>>
>> That said, I propose to
>>
>> 1. Change the way timer IDs are generated. This was done some time ago, so
>> I'm just re-sending this patch;
>
> Seems fine in principle. Aside: I noticed there were some
> important-looking patches to the idr usage in timer id allocation
> today...
Hm, OK, will try to find one.
>> 2. Add a system call that will list timer IDs created by the calling process;
>
> If timers were listed in /proc like fds then you wouldn't need this
> syscall. If we keep adding new syscalls like this CRIU will be
> needlessly x86-specific when it could have been written more portably.
>
>> 3. Add a system call that will allow to get the sigevent information about
>> particular timer in the sigaction-like manner.
>
> You mentioned "extending the POSIX timer API". Isn't that something
> best left to standards bodies lest your changes conflict with theirs?
> Again, if this were a /proc interface you wouldn't have that issue
> (you'll have others ;)).
>
>>
>> This is actually an RFC to start discussion about how the described problems
>> can be addressed. Thus, if the approach with new system calls is not acceptable,
>> I'm OK to implement this in any other form.
>
> My preference is for "other form" for the reasons above.
No problem, proc is OK for me as well. I will look at what can be done here.
Thanks for the feedback!
> Cheers,
> -Matt Helsley
> .
>
prev parent reply other threads:[~2013-02-21 10:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-14 16:18 [PATCH 0/3] posix timers: Extend kernel API to report more info about timers Pavel Emelyanov
2013-02-14 16:19 ` [PATCH 1/3] posix timers: Allocate timer id per process Pavel Emelyanov
2013-02-14 20:13 ` Sasha Levin
2013-02-15 5:13 ` Pavel Emelyanov
2013-02-14 16:19 ` [PATCH 2/3] posix timers: Add syscall that lists timer IDs armed by process Pavel Emelyanov
2013-02-14 16:19 ` [PATCH 3/3] posix timers: Add syscall that works on timer sigevent Pavel Emelyanov
2013-02-17 13:42 ` Jann Horn
2013-02-17 18:53 ` Pavel Emelyanov
2013-02-21 1:21 ` [PATCH 0/3] posix timers: Extend kernel API to report more info about timers Matthew Helsley
2013-02-21 10:35 ` Pavel Emelyanov [this message]
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=5125F87B.7020205@parallels.com \
--to=xemul@parallels.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matt.helsley@gmail.com \
--cc=mingo@redhat.com \
--cc=mtk.manpages@gmail.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/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