[Devel] Re: [PATCH 6/15] Make alloc_pid(), free_pid() and put_pid() work with struct upid

2007-07-30 Thread Pavel Emelyanov
Oleg Nesterov wrote: On 07/26, Pavel Emelyanov wrote: -struct pid *alloc_pid(void) +struct pid *alloc_pid(struct pid_namespace *ns) Why? We have the only caller, copy_process(), ns == task_active_pid_ns() always. task_active_pid_ns() by newly created task, not the current! That's why we

[Devel] Re: [PATCH 3/15] kern_siginfo helper

2007-07-30 Thread Pavel Emelyanov
Oleg Nesterov wrote: On 07/26, Pavel Emelyanov wrote: TODO: This is more an exploratory patch and modifies only interfaces necessary to implement correct signal semantics in pid namespaces. If the approach is feasible, we could consistently use 'kern_siginfo'

[Devel] Re: [PATCH 8/15] Helpers to find the task by its numerical ids

2007-07-30 Thread Pavel Emelyanov
Oleg Nesterov wrote: On 07/26, Pavel Emelyanov wrote: +#define find_pid(pid) find_pid_ns(pid, init_pid_ns) Again, I think find_pid() should use current's active ns, not init_pid_ns. Just grep for find_pid/find_task_by_pid. --- linux-2.6.23-rc1-mm1.orig/kernel/pid.c 2007-07-26

[Devel] Re: [PATCH 9/15] Move alloc_pid() after the namespace is cloned

2007-07-30 Thread Pavel Emelyanov
Oleg Nesterov wrote: On 07/26, Pavel Emelyanov wrote: This is a fix for Sukadev's patch that moved the alloc_pid() call from do_fork() into copy_process(). ... and this patch changes almost every line from Sukadev's patch. It does. My bad :( I have reviewed Suka's patch badly and was sure

[Devel] Re: [PATCH 10/15] Make each namespace has its own proc tree

2007-07-30 Thread Pavel Emelyanov
Oleg Nesterov wrote: On 07/26, Pavel Emelyanov wrote: static int proc_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name, void *data, struct vfsmount *mnt) { [...snip...] + if (!sb-s_root) { + sb-s_flags = flags; + err =

[Devel] Re: [PATCH 15/15] Hooks over the code to show correct values to user

2007-07-30 Thread Pavel Emelyanov
Oleg Nesterov wrote: On 07/26, Pavel Emelyanov wrote: int kill_proc(pid_t pid, int sig, int priv) { - return kill_proc_info(sig, __si_special(priv), pid); + int ret; + + rcu_read_lock(); + ret = kill_pid_info(sig, __si_special(priv), find_pid(pid)); +

[Devel] [PATCH] Add CTL_PROC back

2007-07-30 Thread Alexey Dobriyan
commit eab03ac7bd3e0da99eb9dc068772a85a5e3f3577 aka [PATCH] Get rid of /proc/sys/proc was good commit except strace(1) compile breakage it introduced: system.c:1581: error: 'CTL_PROC' undeclared here (not in a function) So, add dummy enum back. Signed-off-by: Alexey Dobriyan [EMAIL

[Devel] Re: [2.6.22] negative time jump

2007-07-30 Thread Vasily Averin
Groundhog Day? Vasily Averin wrote: [EMAIL PROTECTED] ~]# echo 1 /proc/timer_stats [EMAIL PROTECTED] ~]# cat /proc/timer_stats Timer Stats Version: v0.1 Sample period: 17.992 s 0 total events [EMAIL PROTECTED] ~]# cat /proc/timer_stats Timer Stats Version: v0.1 Sample period: -4366.278 s

[Devel] Re: [PATCH 2/4] sysfs: Implement sysfs manged shadow directory support.

2007-07-30 Thread Tejun Heo
Hello, Kirill. Kirill Korotaev wrote: Imho then OpenOVZ approach with multiple sysfs trees is better. it allows to use cached dentries with moultiple sysfs mounts each having different view. It also allows to hide hw-related entries and events from the containers and has quite little

[Devel] Re: [PATCH 2/4] sysfs: Implement sysfs manged shadow directory support.

2007-07-30 Thread Tejun Heo
Kirill Korotaev wrote: Tejun Heo wrote: I thought something like supermount plus some twists or fuse based sysfs proxy would fit better. Dunno whether or how uevent and polling stuff can work that way tho. Note that sysfs no longer keeps dentries and inodes pinned. It might make the shared

[Devel] Re: [PATCH 2/4] sysfs: Implement sysfs manged shadow directory support.

2007-07-30 Thread Eric W. Biederman
Tejun Heo [EMAIL PROTECTED] writes: Hello, Okay, some questions. * What do you think about not allowing duplicate names across different tags? ie. there's only one ethX anywhere but it's visible only in a specific namespace (and maybe in the default global one). Or does everyone need

[Devel] Re: [PATCH 14/15] Destroy pid namespace on init's death

2007-07-30 Thread Oleg Nesterov
On 07/30, Pavel Emelyanov wrote: Oleg Nesterov wrote: + + nfree = 0; + for (i = 0; i PIDMAP_ENTRIES; i++) + nfree += atomic_read(pid_ns-pidmap[i].nr_free); + + /* +* If pidmap has entries for processes other than 0 and 1, retry. +*/ + if (nfree (BITS_PER_PAGE

[Devel] Re: [PATCH 2/4] sysfs: Implement sysfs manged shadow directory support.

2007-07-30 Thread Carl-Daniel Hailfinger
Hi, On 26.07.2007 10:00, Tejun Heo wrote: Okay, some questions. * What do you think about not allowing duplicate names across different tags? ie. there's only one ethX anywhere but it's visible only in a specific namespace (and maybe in the default global one). Or does everyone need its

[Devel] Re: [PATCH 9/15] Move alloc_pid() after the namespace is cloned

2007-07-30 Thread sukadev
Pavel Emelianov [EMAIL PROTECTED] wrote: | Oleg Nesterov wrote: | On 07/26, Pavel Emelyanov wrote: | This is a fix for Sukadev's patch that moved the alloc_pid() call from | do_fork() into copy_process(). | | ... and this patch changes almost every line from Sukadev's patch. | | It does. My bad

[Devel] Re: [PATCH 3/15] kern_siginfo helper

2007-07-30 Thread sukadev
Pavel Emelianov [EMAIL PROTECTED] wrote: | Oleg Nesterov wrote: | On 07/26, Pavel Emelyanov wrote: | TODO: This is more an exploratory patch and modifies only | interfaces | necessary to implement correct signal semantics in pid namespaces. | | If the approach is feasible, we

[Devel] Re: [PATCH 2/4] sysfs: Implement sysfs manged shadow directory support.

2007-07-30 Thread Eric W. Biederman
Ugh. I need to step back and carefully define what I'm seeing but it looks like the current sysfs locking is wrong. I'm starting to find little inconsistencies all over the place such as: Which lock actually protects sd-s_children? - It isn't sysfs_mutex. (see sysfs_lookup) - It isn't

[Devel] Re: [-mm PATCH 4/9] Memory controller memory accounting (v4)

2007-07-30 Thread YAMAMOTO Takashi
+ lock_meta_page(page); + /* + * Check if somebody else beat us to allocating the meta_page + */ + race_mp = page_get_meta_page(page); + if (race_mp) { + kfree(mp); + mp = race_mp; + atomic_inc(mp-ref_cnt); +

[Devel] Re: [PATCH 2/4] sysfs: Implement sysfs manged shadow directory support.

2007-07-30 Thread Tejun Heo
Hello, Eric W. Biederman wrote: Ugh. I need to step back and carefully define what I'm seeing but it looks like the current sysfs locking is wrong. I'm starting to find little inconsistencies all over the place such as: Which lock actually protects sd-s_children? - It isn't

[Devel] Re: [PATCH 2/4] sysfs: Implement sysfs manged shadow directory support.

2007-07-30 Thread Tejun Heo
Hello, Eric W. Biederman wrote: How close are we to the point where we can get mount sysfs multiple times and get multiple dentry trees with different super blocks? Yeah, that sounds much better. We only have to pay attention to getting sysfs_dirent tree correct. The rest can be done by just

[Devel] Re: [PATCH 2/4] sysfs: Implement sysfs manged shadow directory support.

2007-07-30 Thread Eric W. Biederman
Tejun Heo [EMAIL PROTECTED] writes: Hello, Eric W. Biederman wrote: Ugh. I need to step back and carefully define what I'm seeing but it looks like the current sysfs locking is wrong. I'm starting to find little inconsistencies all over the place such as: Which lock actually protects

[Devel] Re: [PATCH 2/4] sysfs: Implement sysfs manged shadow directory support.

2007-07-30 Thread Tejun Heo
Eric W. Biederman wrote: What do we use inode-i_mutex for? I think we might be able to kill that. I'm starting to wonder if we can completely remove sysfs from grabbing inode-i_mutex. i_mutex is grabbed when dentry and inode locking requires it. It's not used to protect sysfs internal

[Devel] Re: [2.6.22] negative time jump

2007-07-30 Thread Vasily Averin
john stultz wrote: On 7/29/07, Vasily Averin [EMAIL PROTECTED] wrote: I've investigated why my testnode freezes. When I found that node is freezed again I've started to press Sysrq keys and noticed the following negative time jump. Could anybody please help me to understand the reasons of