From: Pavel Machek <pavel@ucw.cz>
To: Nadia.Derbey@bull.net
Cc: linux-kernel@vger.kernel.org,
containers@lists.linux-foundation.org, orenl@cs.columbia.edu,
nick@nick-andrew.net
Subject: Re: [PATCH 0/4] - v2 - Object creation with a specified id
Date: Wed, 23 Apr 2008 16:23:51 +0200 [thread overview]
Message-ID: <20080423142350.GA9228@ucw.cz> (raw)
In-Reply-To: <20080418054459.891481000@bull.net>
Hi!
> When restarting a process that has been previously checkpointed, that process
> should keep on using some of its ids (such as its process id, or sysV ipc ids).
>
> This patch provides a feature that can help ensuring this saved state reuse:
> it makes it possible to create an object with a pre-defined id.
>
> A first implementation had been proposed 2 months ago. It consisted in
> changing an object's id after it had been created.
>
> Here is a second implementation based on Oren Ladaan's idea: Oren's suggestion
> was to force an object's id during its creation, rather than 1. create it,
> 2. change its id.
>
> A new file is created in procfs: /proc/self/task/<my_tid>/next_id.
> This makes it possible to avoid races between several threads belonging to
> the same process.
Ugly...
> When this file is filled with an id value, a structure pointed to by the
> calling task_struct is filled with that id.
>
> Then, when an object supporting this feature is created, the id present in
> that new structure is used, instead of the default one.
>
> The syntax is one of:
> . echo "LONG XX" > /proc/self/task/<my_tid>/next_id
> next object to be created will have an id set to XX
> . echo "LONG<n> X0 ... X<n-1>" > /proc/self/task/<my_tid>/next_id
> next object to be created will have its ids set to XX0, ... X<n-1>
> This is particularly useful for processes that may have several ids if
> they belong to nested namespaces.
So ugly it is not even funny.
Create fork_with_pid(int pid) and corresponding ipc primitives, if
you have to...
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
prev parent reply other threads:[~2008-04-23 14:24 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-18 5:44 Nadia.Derbey
2008-04-18 5:45 ` [PATCH 1/4] - v2 - Provide a new procfs interface to set next id Nadia.Derbey
2008-04-18 5:45 ` [PATCH 2/4] - v2 - Provide a new procfs interface to set next upid nr(s) Nadia.Derbey
2008-04-18 5:45 ` [PATCH 3/4] - v2 - IPC: use the target ID specified in procfs Nadia.Derbey
2008-04-18 5:45 ` [PATCH 4/4] - v2 - PID: " Nadia.Derbey
2008-04-18 17:07 ` [PATCH 0/4] - v2 - Object creation with a specified id Dave Hansen
2008-04-21 11:32 ` Nadia Derbey
2008-04-22 19:36 ` Checkpoint/restart (was Re: [PATCH 0/4] - v2 - Object creation with a specified id) Alexey Dobriyan
2008-04-22 18:56 ` Dave Hansen
2008-04-22 19:51 ` Serge E. Hallyn
2008-04-22 21:01 ` Alexey Dobriyan
2008-04-22 22:56 ` Dave Hansen
2008-04-23 6:40 ` Kirill Korotaev
2008-04-23 15:33 ` Dave Hansen
2008-04-24 7:00 ` Kirill Korotaev
2008-04-24 18:30 ` Dave Hansen
2008-04-24 23:13 ` Oren Laadan
2008-04-24 1:19 ` Oren Laadan
2008-07-10 1:58 ` Eric W. Biederman
2008-07-10 17:12 ` Dave Hansen
2008-07-10 17:32 ` Serge E. Hallyn
2008-07-10 18:55 ` Eric W. Biederman
2008-07-10 19:06 ` Dave Hansen
2008-07-10 19:21 ` Eric W. Biederman
2008-07-10 19:47 ` Dave Hansen
2008-07-11 0:32 ` Alexey Dobriyan
2008-07-17 23:19 ` Oren Laadan
2008-07-17 23:16 ` Oren Laadan
2008-07-18 16:18 ` Serge E. Hallyn
2008-07-17 23:14 ` Oren Laadan
2008-07-17 23:09 ` Oren Laadan
2008-04-23 14:23 ` Pavel Machek [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=20080423142350.GA9228@ucw.cz \
--to=pavel@ucw.cz \
--cc=Nadia.Derbey@bull.net \
--cc=containers@lists.linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nick@nick-andrew.net \
--cc=orenl@cs.columbia.edu \
/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
Powered by JetHome