[Devel] Re: [PATCH 0/3] clone64() and unshare64() system calls

2008-04-10 Thread Cedric Le Goater
H. Peter Anvin wrote: [EMAIL PROTECTED] wrote: This is a resend of the patch set Cedric had sent earlier. I ported the patch set to 2.6.25-rc8-mm1 and tested on x86 and x86_64. --- We have run out of the 32 bits in clone_flags ! This patchset introduces 2 new system calls which support

Re: [Devel] MAKEDEV-3.3.13-1.3.swsoft.i386.rpm

2008-04-10 Thread Robert Nelson
Robert Nelson wrote: Where can I get the source rpm for MAKEDEV-3.3.13-1.3.swsoft.i386.rpm? ___ Devel mailing list Devel@openvz.org https://openvz.org/mailman/listinfo/devel Never mind, I found the modified MAKEDEV.spec in

[Devel] Re: [RFC][PATCH 0/7] Clone PTS namespace

2008-04-10 Thread Eric W. Biederman
On Wed, 2008-04-09 at 20:59 -0500, Serge E. Hallyn wrote: Feh, so of course sysfs would have the most interactions for a device namespace, but now we have pty, network, and user namespace all needing some sort of sysfs solution. For a quickfix for CONFIG_USER_SCHED+CONFIG_USER_NS, I just

[Devel] Re: [RFC][PATCH] another swap controller for cgroup

2008-04-10 Thread YAMAMOTO Takashi
the following is a new version of the patch. changes from the previous: - fix a BUG_ON in swap_cgroup_attach and add a comment about it. YAMAMOTO Takashi Signed-off-by: YAMAMOTO Takashi [EMAIL PROTECTED] --- --- linux-2.6.25-rc3-mm1/init/Kconfig.BACKUP2008-03-05 15:45:50.0

[Devel] [PATCH 0/10] Make bsd process accounting work in pid namespaces

2008-04-10 Thread Pavel Emelyanov
After I fixed access to task-tgid in kernel/acct.c, Oleg pointed out some bad side effects with this accounting vs pid namespaces interaction. So here is the approach to make this accounting work with pid namespaces properly. The idea is simple - when task dies it accounts itself in each

[Devel] [PATCH 2/10] Pidns: use kzalloc to allocate new pid namespace

2008-04-10 Thread Pavel Emelyanov
It makes many fields initialization implicit, fixes void * = 0 (the ns-pidmap[i].page = 0) noise and will help in auto-setting to NULL bsd-acct related field. Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED] --- kernel/pid_namespace.c |8 ++-- 1 files changed, 2 insertions(+), 6

[Devel] [PATCH 3/10] Pidns: add struct bsd_acct_struct *bacct field on pid_namespace

2008-04-10 Thread Pavel Emelyanov
It will be NULL automatically for all new namespaces. Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED] --- include/linux/pid_namespace.h |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/include/linux/pid_namespace.h b/include/linux/pid_namespace.h index

[Devel] [PATCH 4/10] Bsdacct: fix bogus comment near acct_process

2008-04-10 Thread Pavel Emelyanov
It does not accept any arguments :) Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED] --- kernel/acct.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/kernel/acct.c b/kernel/acct.c index ee3e605..d9ee183 100644 --- a/kernel/acct.c +++ b/kernel/acct.c @@ -579,7 +579,6 @@

[Devel] [PATCH 7/10] Bsdacct: stop using global bsd_acct_struct instance in internal functions

2008-04-10 Thread Pavel Emelyanov
This adds the appropriate pointer to all the internal (i.e. static) functions that work with global acct instance. API calls pass this global one to them by now. Essentially this is a plain s/acct_globals./acct-/ over the file. Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED] --- kernel/acct.c

[Devel] [PATCH 6/10] Bsdacct: make the acct_lock global

2008-04-10 Thread Pavel Emelyanov
Don't use per-bsd-acct-struct lock, but work with a global one. This lock is taken for short periods, so it's not going to be a bottleneck, but it will allow us to easily avoid many locking difficulties in the future. Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED] --- kernel/acct.c | 42

[Devel] [PATCH 5/10] Bsdacct: make check timer accept an argument

2008-04-10 Thread Pavel Emelyanov
We're going to have many bsd_acct_struct instances, not just one, so the timer (currently working with a global one) has to know which one to work with. Use a handy setup_timer macro for it (thanks to Oleg for one). Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED] --- kernel/acct.c |9

[Devel] Re: [PATCH 1/3] change clone_flags type to u64

2008-04-10 Thread Andi Kleen
[EMAIL PROTECTED] writes: From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [lxc-dev] [patch -lxc 1/3] change clone_flags type to u64 This is a preliminary patch changing the clone_flags type to 64bits for all the routines called by do_fork(). I must admit I was always a little

[Devel] [PATCH 1/10] Bsdacct: rename acct_glbl structure

2008-04-10 Thread Pavel Emelyanov
It will be visible in pid_namespace.h file, so fixup its name first. Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED] --- kernel/acct.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/acct.c b/kernel/acct.c index 91e1cfd..ee3e605 100644 --- a/kernel/acct.c +++

[Devel] [PATCH 8/10] Bsdacct: make bsd_acct_struct per pid namespace

2008-04-10 Thread Pavel Emelyanov
Allocate the structure on the first call to sys_acct(). After this each namespace, that ordered the accounting, will live with this structure till its own death. Two notes - routines, that close the accounting on fs umount time use the init_pid_ns's acct by now; - accounting routine accounts

[Devel] [PATCH 10/10] Bsdacct: account task in each namespace is is visible from

2008-04-10 Thread Pavel Emelyanov
This just makes the acct_proces walk the pid namespaces from current up to the top and account a task in each with the accounting turned on. Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED] --- kernel/acct.c | 21 ++--- 1 files changed, 14 insertions(+), 7 deletions(-) diff

[Devel] [PATCH 9/10] Bsdacct: stop accounting for all namespaces on umount time

2008-04-10 Thread Pavel Emelyanov
All the bsd_acct_strcts with opened accounting are linked into a global list. So, the acct_auto_close(_mnt) walks one and drops the accounting for each. BTW, it worth dropping the acct-file != NULL check from these routines, but I noticed this only when started sending the set :( ... Will do it

[Devel] Re: [PATCH net-2.6.26 1/3][TUN][NETNS]: Introduce the tun_net structure.

2008-04-10 Thread David Miller
From: Pavel Emelyanov [EMAIL PROTECTED] Date: Wed, 02 Apr 2008 17:50:21 +0400 This is the first step in making tuntap devices work in net namespaces. The structure mentioned is pointed by struct net and tun driver will fill this one on load. It will contain only the tun devices list. So

[Devel] Re: [PATCH 1/3] change clone_flags type to u64

2008-04-10 Thread Cedric Le Goater
Hello Andi, Andi Kleen wrote: [EMAIL PROTECTED] writes: From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [lxc-dev] [patch -lxc 1/3] change clone_flags type to u64 This is a preliminary patch changing the clone_flags type to 64bits for all the routines called by do_fork(). I must

[Devel] Re: [PATCH 0/3] clone64() and unshare64() system calls

2008-04-10 Thread Cedric Le Goater
H. Peter Anvin wrote: [EMAIL PROTECTED] wrote: If you're going to make it a 64-bit pass it in as a 64-bit number, instead of breaking it into two numbers. Maybe I am missing your point. The glibc interface could take a 64bit parameter, but don't we need to pass 32-bit values into the system

[Devel] Re: [PATCH 1/3] change clone_flags type to u64

2008-04-10 Thread Kirill Korotaev
The was no real rationale except for some people seeing clone functionality as the match and the fact that FS_NAMESCAPE was done so made them believe it is a good way to go. And I warned about flags limitation at the beginning. Both OpenVZ/vserver suggested to use a special syscall for handling

[Devel] Re: [PATCH 1/3] change clone_flags type to u64

2008-04-10 Thread Cedric Le Goater
Andi Kleen wrote: I guess that was a development rationale. But what rationale? It just doesn't make much sense to me. Let's add Eric in Cc: Most of the namespaces are in use in the container projects like openvz, vserver and probably others and we needed a way to activate the code.

[Devel] [PATCH 0/14 (3 subsets)] Make tuns and vlans devices work per-net.

2008-04-10 Thread Pavel Emelyanov
Hi, guys. I've recently sent a TUN devices virtualization, but it was rejected by Dave, since the struct net is becoming a dumping ground. I agree with him - we really need some way to register on-net data dynamically. That's my view of such a thing and two examples of how to use it (TUN and

[Devel] [PATCH 1/14][NETNS]: Introduce the net-subsys id generator.

2008-04-10 Thread Pavel Emelyanov
To make some per-net generic pointers, we need some way to address them, i.e. - IDs. This is simple IDA-based IDs generator for pernet subsystems. They will be used in the next patches. Since it will be used by devices only (tun and vlan), I make it resemble the register_pernet_device

[Devel] [PATCH 2/14][NETNS]: Generic per-net pointers.

2008-04-10 Thread Pavel Emelyanov
Add the elastic array of void * pointer to the struct net. The access rules are simple: 1. register the ops with register_pernet_gen_device to get the id of your private pointer 2. call net_assign_generic() to put the private data on the struct net (most preferably this should be done

[Devel] [PATCH 3/14][TUN]: Introduce the tun_net structure.

2008-04-10 Thread Pavel Emelyanov
This is the first step in making tuntap devices work in net namespaces. The structure mentioned is pointed by generic net pointer with tun_net_id id, and tun driver fills one on its load. It will contain only the tun devices list. So declare this structure and introduce net init and exit hooks.

[Devel] [PATCH 4/14][TUN]: Actually make the tun_dev_list per-net.

2008-04-10 Thread Pavel Emelyanov
Remove the static tun_dev_list and replace its occurrences in driver with per-net one. It is used in two places - in tun_set_iff and tun_cleanup. In the first case it's legal to use current net_ns. In the cleanup call - move the loop, that unregisters all devices in net exit hook. This shows

[Devel] [PATCH 5/14][TUN]: Allow to register tun devices in namespace.

2008-04-10 Thread Pavel Emelyanov
This is basically means that a net is set for a new device, but actually this involves two more steps: 1. mark the tun device as local, i.e. do not allow for it to move across namespaces. This is done so, since tun device is most often associated to some file (and thus to some process) and

[Devel] [PATCH 6/14][RTNL]: Introduce the rtnl_kill_links call.

2008-04-10 Thread Pavel Emelyanov
... which will kill all the devices in the given net with the given rtnl_link_ops. Will be used in VLAN patches later. Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED] --- include/net/rtnetlink.h |1 + net/core/rtnetlink.c| 29 + 2 files changed, 22

[Devel] [PATCH 7/14][VLAN]: Tag vlan_group with device, not ifindex.

2008-04-10 Thread Pavel Emelyanov
We'll have to lookup the vlan_group by two keys - ifindex and net. Turning the vlan_group lookup key to struct net_device pointer will make this process easier. Besides, this will eliminate one more place in the networking, that assumes that indexes are unique in the kernel. Signed-off-by: Pavel

[Devel] [PATCH 8/14][VLAN]: Introduce the vlan_net structure.

2008-04-10 Thread Pavel Emelyanov
It is empty now, but it will be populated later. And it uses net generic pointers like TUN does. Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED] --- net/8021q/vlan.c | 46 ++ net/8021q/vlan.h |5 + 2 files changed, 51 insertions(+), 0

[Devel] [PATCH 9/14][VLAN]: Add net argument to proc init/cleanup calls.

2008-04-10 Thread Pavel Emelyanov
Proc files will be created in each net, so prepare them for this change just to make patches smaller. The net != init_net checks in them are for git-bisect sanity, but I'll drop them soon. Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED] --- net/8021q/vlan.c | 15 +++

[Devel] [PATCH 10/14][VLAN]: Create proc files in proper net.

2008-04-10 Thread Pavel Emelyanov
This is essentially a PATCH #9 part 2 - use the net pointer passed in. Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED] --- net/8021q/vlan.h |6 ++ net/8021q/vlanproc.c | 44 +--- 2 files changed, 23 insertions(+), 27 deletions(-) diff

[Devel] [PATCH 11/14][VLAN]: Make /proc/net/vlan/conf file show per-net info.

2008-04-10 Thread Pavel Emelyanov
And this one if PATCH #9 part 3 :) After this proc may show relevant to each net namespace info. Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED] --- net/8021q/vlanproc.c | 13 - 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/net/8021q/vlanproc.c

[Devel] [PATCH 12/14][VLAN]: Make vlan_name_type per-net.

2008-04-10 Thread Pavel Emelyanov
Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED] --- net/8021q/vlan.c | 14 +- net/8021q/vlan.h |4 ++-- net/8021q/vlanproc.c |7 +-- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index 541542e..5cacad0

[Devel] [PATCH 13/14][VLAN]: Allows vlan devices registration in net namespace.

2008-04-10 Thread Pavel Emelyanov
This one is similar to what I've done for TUN - set the proper net after device allocation and clean VLANs on net exit. Plus, drop explicit init_net usage. Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED] --- net/8021q/vlan.c |7 +++ net/8021q/vlan_dev.c |3 ---

[Devel] [PATCH 14/14][VLAN]: Migrate proc files when vlan device is moved to namespace.

2008-04-10 Thread Pavel Emelyanov
The preparations to this are done with my patch, that fixed proc on vlan device rename. This makes /proc/net/vlan/device file migrate from one proc tree to another... Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED] --- net/8021q/vlan.c | 13 - 1 files changed, 8 insertions(+),

[Devel] Re: [PATCH 0/3] clone64() and unshare64() system calls

2008-04-10 Thread H. Peter Anvin
Cedric Le Goater wrote: OK. I didn't know that. I took sys_llseek() as an example of an interface to follow when coded clone64(). llseek() was the first system call that took a doublewidth argument. It's not the one you want to mimic. -hpa

[Devel] Re: [RFC][-mm] [1/2] Simple stats for cpu resource controller

2008-04-10 Thread Balaji Rao
On Monday 07 April 2008 06:54:53 pm Peter Zijlstra wrote: On Sun, 2008-04-06 at 02:01 +0530, Balaji Rao wrote: +static s64 cpu_cgroup_read_stat(struct cpu_cgroup_stat *stat, + enum cpu_cgroup_stat_index idx) +{ + int cpu; + s64 ret = 0; +

[Devel] Re: [RFC][-mm] [1/2] Simple stats for cpu resource controller

2008-04-10 Thread Peter Zijlstra
On Thu, 2008-04-10 at 21:39 +0530, Balaji Rao wrote: On Monday 07 April 2008 06:54:53 pm Peter Zijlstra wrote: On Sun, 2008-04-06 at 02:01 +0530, Balaji Rao wrote: +static s64 cpu_cgroup_read_stat(struct cpu_cgroup_stat *stat, + enum cpu_cgroup_stat_index idx) +{

[Devel] Re: [RFC][PATCH 0/7] Clone PTS namespace

2008-04-10 Thread Serge E. Hallyn
Quoting Eric W. Biederman ([EMAIL PROTECTED]): On Wed, 2008-04-09 at 20:59 -0500, Serge E. Hallyn wrote: Feh, so of course sysfs would have the most interactions for a device namespace, but now we have pty, network, and user namespace all needing some sort of sysfs solution. For a

[Devel] Re: [PATCH 1/3] change clone_flags type to u64

2008-04-10 Thread Serge E. Hallyn
Quoting Andi Kleen ([EMAIL PROTECTED]): I guess that was a development rationale. But what rationale? It just doesn't make much sense to me. Most of the namespaces are in use in the container projects like openvz, vserver and probably others and we needed a way to activate the

Re: [Devel] [PATCH 1/14][NETNS]: Introduce the net-subsys id generator.

2008-04-10 Thread Paul Menage
On Thu, Apr 10, 2008 at 8:01 AM, Pavel Emelyanov [EMAIL PROTECTED] wrote: +int register_pernet_gen_device(int *id, struct pernet_operations *ops) +{ + int error; + mutex_lock(net_mutex); +again: + error = ida_get_new_above(net_generic_ids, 1, id); + if (error)

[Devel] Re: [PATCH 0/3] clone64() and unshare64() system calls

2008-04-10 Thread sukadev
Paul Menage [EMAIL PROTECTED] wrote: | On Wed, Apr 9, 2008 at 7:38 PM, [EMAIL PROTECTED] wrote: | | But as Jon Corbet pointed out in the the thread above, it looked like | adding a new system call has been the traditional way of solving this | in Linux so far and there has been no

[Devel] Re: [RFC] Control Groups Roadmap ideas

2008-04-10 Thread Paul Menage
On Tue, Apr 8, 2008 at 7:28 PM, Li Zefan [EMAIL PROTECTED] wrote: Sounds good, and I wrote a prototype in a quick: Yes, that's pretty much what I was envisaging, thanks. Paul diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index a6a6035..091bc21 100644 ---

[Devel] Re: [PATCH 1/14][NETNS]: Introduce the net-subsys id generator.

2008-04-10 Thread Daniel Lezcano
Pavel Emelyanov wrote: To make some per-net generic pointers, we need some way to address them, i.e. - IDs. This is simple IDA-based IDs generator for pernet subsystems. They will be used in the next patches. Since it will be used by devices only (tun and vlan), I make it resemble the

[Devel] Re: [RFC][PATCH 0/7] Clone PTS namespace

2008-04-10 Thread sukadev
Serge E. Hallyn [EMAIL PROTECTED] wrote: | | Further what I did for the network namespace should easily handle the | uid/gid namespace and should be a good starting place for a general | device namespace. | | Agreed. What's the git url and which branch do i use for your proof | of concept

[Devel] Re: [PATCH 6/14][RTNL]: Introduce the rtnl_kill_links call.

2008-04-10 Thread Daniel Hokka Zakrisson
Pavel Emelyanov wrote: ... which will kill all the devices in the given net with the given rtnl_link_ops. Will be used in VLAN patches later. Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED] --- include/net/rtnetlink.h |1 + net/core/rtnetlink.c| 29 +

[Devel] Re: [PATCH 1/3] change clone_flags type to u64

2008-04-10 Thread Daniel Hokka Zakrisson
Serge E. Hallyn wrote: Quoting Andi Kleen ([EMAIL PROTECTED]): I guess that was a development rationale. But what rationale? It just doesn't make much sense to me. Most of the namespaces are in use in the container projects like openvz, vserver and probably others and we needed a way

[Devel] Re: [PATCH 1/3] change clone_flags type to u64

2008-04-10 Thread Serge E. Hallyn
Quoting Daniel Hokka Zakrisson ([EMAIL PROTECTED]): Serge E. Hallyn wrote: Quoting Andi Kleen ([EMAIL PROTECTED]): I guess that was a development rationale. But what rationale? It just doesn't make much sense to me. Most of the namespaces are in use in the container projects like

[Devel] Re: [PATCH 3/14][TUN]: Introduce the tun_net structure.

2008-04-10 Thread Paul E. McKenney
On Thu, Apr 10, 2008 at 07:06:24PM +0400, Pavel Emelyanov wrote: This is the first step in making tuntap devices work in net namespaces. The structure mentioned is pointed by generic net pointer with tun_net_id id, and tun driver fills one on its load. It will contain only the tun devices