[Devel] [BUGFIX][RFC][PATCH][only -mm] FIX memory leak in memory cgroup vs. page migration [0/1]

2007-10-02 Thread KAMEZAWA Hiroyuki
Current implementation of memory cgroup controller does following in migration. 1. uncharge when unmapped. 2. charge again when remapped. Consider migrate a page from OLD to NEW. In following case, memory (for page_cgroup) will leak. 1. charge OLD page as page-cache. (charge = 1 2. A process

[Devel] Re: [BUGFIX][RFC][PATCH][only -mm] FIX memory leak in memory cgroup vs. page migration [1/1] fix page migration under memory contoller

2007-10-02 Thread KAMEZAWA Hiroyuki
While using memory control cgroup, page-migration under it works as following. == 1. uncharge all refs at try to unmap. 2. charge regs again remove_migration_ptes() == This is simple but has following problems. == The page is uncharged and chaged back again if *mapped*. - This means that

[Devel] Re: [RFC][PATCH 0/2] New API to change the IDs of an existing IPC

2007-10-02 Thread Michael Kerrisk
Hi Pierre, As I'm seeing some discussion/interest about IPC, I would like to propose these patches, which provide an easy way to change the ID of an exiting IPC. This work is done around the checkpoint/restart of applications. In the case of the IPCs, we need (among others) this

[Devel] [patch -mm 0/5] mqueue namespace

2007-10-02 Thread Cedric Le Goater
Hello, Here's the mqueue namespace patchset. If you're OK with it, I'll rebase on the next -mm which should contain the new CONFIG_NAMESPACES and send to andrew. Thanks ! C. ___ Containers mailing list [EMAIL PROTECTED]

[Devel] [patch -mm 2/5] mqueue namespace : add unshare support

2007-10-02 Thread Cedric Le Goater
From: Cedric Le Goater [EMAIL PROTECTED] This patch includes the mqueue namespace in the nsproxy object. It also adds the support of unshare() and clone() with a new clone flag CLONE_NEWMQ (1 bit left in the clone flags !) CLONE_NEWMQ is required to be cloned or unshared along with

[Devel] [patch -mm 4/5] mqueue namespace : enable the namespace

2007-10-02 Thread Cedric Le Goater
From: Cedric Le Goater [EMAIL PROTECTED] Move forward and start using the mqueue namespace. The single super block mount of the file system is modified to allow one mount per namespace. This is achieved by storing the namespace in the super_block s_fs_info attribute. Signed-off-by: Cedric Le

[Devel] Re: [patch -mm 1/5] mqueue namespace : add struct mq_namespace

2007-10-02 Thread Kirill Korotaev
Cedric, how safe does it intersect with netlinks from network namespace? I see mqueues can send netlink messages, have you checked how safe it is? Thanks, Kirill Cedric Le Goater wrote: From: Cedric Le Goater [EMAIL PROTECTED] This patch adds a struct mq_namespace holding the common

[Devel] [BUGFIX][RFC][PATCH][only -mm] FIX memory leak in memory cgroup vs. page migration [2/1] additional patch for migrate page/memory cgroup

2007-10-02 Thread KAMEZAWA Hiroyuki
The patch I sent needs following fix, sorry. Anyway, I'll repost good-version with reflected comments again. Thanks, -Kame = fix-page-migration-under-memory-controller patch needs this fix..sorry. - We should uncharge page by mem_cgroup_end_migration() only if page is not charged by

[Devel] Re: [patch -mm 1/5] mqueue namespace : add struct mq_namespace

2007-10-02 Thread Eric W. Biederman
Cedric Le Goater [EMAIL PROTECTED] writes: Hello Kirill, Kirill Korotaev wrote: Cedric, how safe does it intersect with netlinks from network namespace? I see mqueues can send netlink messages, have you checked how safe it is? a ref is taken on the 'struct sock' in the mq_notify()

[Devel] Re: [patch -mm 0/5] mqueue namespace

2007-10-02 Thread Cedric Le Goater
Eric W. Biederman wrote: Cedric Le Goater [EMAIL PROTECTED] writes: Hello, Here's the mqueue namespace patchset. If you're OK with it, I'll rebase on the next -mm which should contain the new CONFIG_NAMESPACES and send to andrew. And before I forget. At least until someone has done

[Devel] Re: [patch -mm 0/5] mqueue namespace

2007-10-02 Thread Cedric Le Goater
Eric W. Biederman wrote: Cedric Le Goater [EMAIL PROTECTED] writes: Hello, Here's the mqueue namespace patchset. If you're OK with it, I'll rebase on the next -mm which should contain the new CONFIG_NAMESPACES and send to andrew. Well the CLONE flag is a conflict with the network

[Devel] Re: [PATCH 5/5] Account for the slub objects

2007-10-02 Thread Pavel Emelyanov
Christoph Lameter wrote: On Mon, 1 Oct 2007, Pavel Emelyanov wrote: + Quick check, slub_free_notify() and slab_alloc_notify() are called from serialized contexts, right? Yup. How is it serialized? They are booth called from __slab_alloc()/__slab_free() from under the slab_lock(page).

Re: [Devel] [PATCH 0/5] Kernel memory accounting container (v5)

2007-10-02 Thread Pavel Emelyanov
Paul Menage wrote: Hi Pavel, One question about the general design of this - have you tested an approach where rather than tagging each object within the cache with the cgroup that allocated it, you instead have (inside the cache code) a separate cache structure for each cgroup? So the

[Devel] [PATCH] mark read_crX() asm code as volatile

2007-10-02 Thread Kirill Korotaev
Some gcc versions (I checked at least 4.1.1 from RHEL5 4.1.2 from gentoo) can generate incorrect code with read_crX()/write_crX() functions mix up, due to cached results of read_crX(). The small app for x8664 below compiled with -O2 demonstrates this (i686 does the same thing):

[Devel] [patch 1/1][NETNS49] Make af_unix autobind per network namespace

2007-10-02 Thread Daniel Lezcano
This patch change the static ordernum variable to be relative to the network namespace. Signed-off-by: Daniel Lezcano [EMAIL PROTECTED] --- include/net/net_namespace.h |1 + net/unix/af_unix.c |5 - 2 files changed, 5 insertions(+), 1 deletion(-) Index:

[Devel] [patch 0/1][NETNS49] Make af_unix autobind per namespace

2007-10-02 Thread Daniel Lezcano
The following patch change autobind fonction to use the ordernum from the network namespace instead of using the local static variable. -- ___ Containers mailing list [EMAIL PROTECTED] https://lists.linux-foundation.org/mailman/listinfo/containers

[Devel] Re: [BUGFIX][RFC][PATCH][only -mm] FIX memory leak in memory cgroup vs. page migration [2/1] additional patch for migrate page/memory cgroup

2007-10-02 Thread Balbir Singh
KAMEZAWA Hiroyuki wrote: The patch I sent needs following fix, sorry. Anyway, I'll repost good-version with reflected comments again. Thanks, -Kame Just saw this now, I'll apply both the fixes, but it would be helpful if you could post, one combined patch. -- Warm Regards,

[Devel] Re: [patch 0/1][NETNS49] Make af_unix autobind per namespace

2007-10-02 Thread Daniel Lezcano
Daniel Lezcano wrote: The following patch change autobind fonction to use the ordernum from the network namespace instead of using the local static variable. I forgot to add this trivial program which does autobind. --- #include sys/socket.h #include sys/un.h #include unistd.h #include

[Devel] Re: [PATCH] Consolidate IPC namespace cleanup functions

2007-10-02 Thread Cedric Le Goater
Pavel Emelyanov wrote: When the IPC namespace is terminated all the IPC objects (i.e. ids) living in it are freed. This is done in a similar way in X_exit_ns() functions. All the code can be consolidated, saving 122 bytes when the NAMESPACES are on. This patch must be applied after the ones

[Devel] Re: [PATCH] mark read_crX() asm code as volatile

2007-10-02 Thread Arjan van de Ven
On Tue, 02 Oct 2007 18:08:32 +0400 Kirill Korotaev [EMAIL PROTECTED] wrote: Some gcc versions (I checked at least 4.1.1 from RHEL5 4.1.2 from gentoo) can generate incorrect code with read_crX()/write_crX() functions mix up, due to cached results of read_crX(). I'm not so sure volatile is

[Devel] Re: [patch -mm 1/5] mqueue namespace : add struct mq_namespace

2007-10-02 Thread Eric W. Biederman
[EMAIL PROTECTED] writes: Cedric Le Goater [EMAIL PROTECTED] wrote: | | however, we have an issue with the signal notification in __do_notify() | we could kill a process in a different pid namespace. | | So I took a quick look at the code as it is (before this patchset) | and the

[Devel] Re: [patch -mm 1/5] mqueue namespace : add struct mq_namespace

2007-10-02 Thread Eric W. Biederman
Cedric Le Goater [EMAIL PROTECTED] writes: however, we have an issue with the signal notification in __do_notify() we could kill a process in a different pid namespace. So I took a quick look at the code as it is (before this patchset) and the taking a reference to a socket and the taking a

[Devel] Re: [PATCH] mark read_crX() asm code as volatile

2007-10-02 Thread Chuck Ebbert
On 10/02/2007 11:28 AM, Arjan van de Ven wrote: On Tue, 02 Oct 2007 18:08:32 +0400 Kirill Korotaev [EMAIL PROTECTED] wrote: Some gcc versions (I checked at least 4.1.1 from RHEL5 4.1.2 from gentoo) can generate incorrect code with read_crX()/write_crX() functions mix up, due to cached

[Devel] Re: [PATCH] mark read_crX() asm code as volatile

2007-10-02 Thread H. Peter Anvin
Arjan van de Ven wrote: On Tue, 02 Oct 2007 18:08:32 +0400 Kirill Korotaev [EMAIL PROTECTED] wrote: Some gcc versions (I checked at least 4.1.1 from RHEL5 4.1.2 from gentoo) can generate incorrect code with read_crX()/write_crX() functions mix up, due to cached results of read_crX(). I'm

[Devel] Re: [patch 0/1][NETNS49] Make af_unix autobind per namespace

2007-10-02 Thread Daniel Lezcano
Eric W. Biederman wrote: Daniel Lezcano [EMAIL PROTECTED] writes: The following patch change autobind fonction to use the ordernum from the network namespace instead of using the local static variable. Why do we care? Information leak? Some application is expecting a predictable autobind

[Devel] Re: [PATCH] mark read_crX() asm code as volatile

2007-10-02 Thread Nick Piggin
On Wednesday 03 October 2007 04:27, Chuck Ebbert wrote: On 10/02/2007 11:28 AM, Arjan van de Ven wrote: On Tue, 02 Oct 2007 18:08:32 +0400 Kirill Korotaev [EMAIL PROTECTED] wrote: Some gcc versions (I checked at least 4.1.1 from RHEL5 4.1.2 from gentoo) can generate incorrect code with