When showing pid to user or getting the pid numerical id for in-kernel
use the value of this id may differ depending on the namespace.
This set of helpers is used to get the global pid nr, the virtual (i.e.
seen by task in its namespace) nr and the nr as it is seen from the
specified namespace.
When we create new namespace we will need to allocate the struct pid,
that will have one extra struct upid in array, comparing to the parent.
Thus we need to know the new namespace (if any) in alloc_pid() to init
this struct upid properly, so move the alloc_pid() call lower in
copy_process().
Alexey Dobriyan [EMAIL PROTECTED] writes:
CTL_UNNUMBERED is unneeded, because it expands to
.ctl_name = 0
The same effect can be achieved by skipping .ctl_name initialization,
saving one line per sysctl.
Update docs and headers telling people to not add CTL_ numbers and
giving
On Thu, 2007-07-26 at 18:51 +0400, Pavel Emelyanov wrote:
+extern struct task_struct *find_task_by_pid_type_ns(int type, int pid,
+ struct pid_namespace *ns);
+
+#define find_task_by_pid_ns(nr, ns) \
+ find_task_by_pid_type_ns(PIDTYPE_PID, nr, ns)
+#define
On Thu, 2007-07-26 at 18:46 +0400, Pavel Emelyanov wrote:
+ write_unlock_irq(tasklist_lock);
+ exit_task_namespaces(tsk);
+ write_lock_irq(tasklist_lock);
Are there any other side-effects of doing this? What was the
tasklist_lock protecting here when it was released?
--
From: Sukadev Bhattiprolu [EMAIL PROTECTED]
Terminate all processes in a namespace when the reaper of the namespace
is exiting. We do this by walking the pidmap of the namespace and sending
SIGKILL to all processes.
Signed-off-by: Sukadev Bhattiprolu [EMAIL PROTECTED]
Acked-by: Pavel Emelyanov
When clone() is invoked with CLONE_NEWPID, create a new pid namespace
Since the active pid namespace is special and expected to be the first
entry in pid-upid_list, preserve the order of pid namespaces.
Pid namespaces can be nested and the nesting depth is unlimited.
When a process clones its
Each struct upid element of struct pid has to be initialized properly,
i.e. its nr mst be allocated from appropriate pidmap and it must be
inserted into the hash.
Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED]
---
include/linux/pid.h |2 +-
kernel/pid.c| 52
From: Sukadev Bhattiprolu [EMAIL PROTECTED]
Since task will be visible from different pid namespaces each of them
have to be addressed by multiple pids. struct upid is to store the
information about which id refers to which namespace.
The constuciton looks like this. Each struct pid carried the
Since a task will appear in more than one proc tree we need to shrink many
trees. For this case we pass the struct pid to proc_flush_task() and shrink
the mounts of all the namespaces this pid belongs to.
The NULL passed to it means that only global mount is to be flushed.
This is a preparation
(Comment is taken from Sukadev's patchset-v3)
A pid namespace is a view of a particular set of tasks on the system.
They work in a similar way to filesystem namespaces. A file (or a process)
can be accessed in multiple namespaces, but it may have a different name
in each. In a filesystem,
From: Rik van Riel [EMAIL PROTECTED]
Track non-resident pages through a simple hashing scheme. This way
the space overhead is limited to 1 u32 per page, or 0.1% space overhead
and lookups are one cache miss.
Aside from seeing whether or not a page was recently evicted, we can
also take a
Oleg Nesterov wrote:
On 07/26, Pavel Emelyanov wrote:
Make task release its namespaces after it has reparented all his
children to child_reaper, but before it notifies its parent about
its death.
The reason to release namespaces after reparenting is that when task
exits it may send a signal to
From: Sukadev Bhattiprolu [EMAIL PROTECTED]
With support for multiple pid namespaces, each pid namespace has a
separate child reaper and this process needs some special handling
of signals.
- The child reaper should appear like a normal process to other
processes in its
On Thu, 2007-07-26 at 18:51 +0400, Pavel Emelyanov wrote:
+ * pid_nr(): global id, i.e. the id seen from the init namespace;
+ * pid_vnr() : virtual id, i.e. the id seen from the namespace this pid
+ * belongs to. this only makes sence when called in the
+ *
CTL_UNNUMBERED is unneeded, because it expands to
.ctl_name = 0
The same effect can be achieved by skipping .ctl_name initialization,
saving one line per sysctl.
Update docs and headers telling people to not add CTL_ numbers and
giving example.
This is probably all we can do to stop
Hi,
This is a brush up of the refault patches, as presented by Rik at last
year's OLS:
http://people.redhat.com/riel/riel-OLS2006.pdf
When talking to people at OLS this year there was a renewed interrest in
the concept.
___
Containers mailing list
[EMAIL PROTECTED] wrote:
Pavel Emelianov [EMAIL PROTECTED] wrote:
| [EMAIL PROTECTED] wrote:
| Pavel Emelianov [EMAIL PROTECTED] wrote:
| | Make alloc_pid() initialize pid_numbers and hash them
| | into the hashtable, not the struct pid itself.
| |
| | Signed-off-by: Pavel Emelianov [EMAIL
* Andrew Morton ([EMAIL PROTECTED]) wrote:
Sorry, but I can't be bothered splitting it up. Greg, Chris: please just
apply the bits which apply and drop the other bits if that's OK.
Yup
___
Devel mailing list
Devel@openvz.org
19 matches
Mail list logo