[Devel] Re: irq0 stops working

2007-10-09 Thread Vasily Averin
Jan Engelhardt wrote: On Oct 9 2007 09:26, Vasily Averin wrote: On one of our servers timer interrupts (i.e irq0) are stops working. As result any kernel timers do not triggers and tasks waiting some signals from timers hangs forever. What kernel.. and tried CONFIG_NO_HZ=n? Originally

[Devel] [PATCH][for -mm] Fix and Enhancements for memory cgroup [0/6] intro

2007-10-09 Thread KAMEZAWA Hiroyuki
Hi, Balbir-san This is a patch set against memory cgroup I have now. Reflected comments I got. = [1] charge refcnt fix patch - avoid charging against a page which is being uncharged. [2] fix-err-handling patch - remove unnecesary unlock_page_cgroup()

[Devel] [PATCH][for -mm] Fix and Enhancements for memory cgroup [1/6] fix refcnt race in charge/uncharge

2007-10-09 Thread KAMEZAWA Hiroyuki
The logic of uncharging is - decrement refcnt - lock page cgroup - remove page cgroup. But the logic of charging is - lock page cgroup - increment refcnt - return. Then, one charge will be added to a page_cgroup under being removed. This makes no big trouble (like panic) but one charge is

[Devel] [PATCH][for -mm] Fix and Enhancements for memory cgroup [2/6] fix err handling in charging

2007-10-09 Thread KAMEZAWA Hiroyuki
This unlock_page_cgroup() is unnecessary. Signed-off-by: KAMEZAWA Hiroyuki [EMAIL PROTECTED] mm/memcontrol.c |2 -- 1 file changed, 2 deletions(-) Index: linux-2.6.23-rc8-mm2/mm/memcontrol.c === ---

[Devel] [PATCH][for -mm] Fix and Enhancements for memory cgroup [4/6] avoid handling !LRU page in mem_cgroup_isolate_pages

2007-10-09 Thread KAMEZAWA Hiroyuki
This patch makes mem_cgroup_isolate_pages() to be - ignore !PageLRU pages. - fixes the bug that it makes no progress if page_zone(page) != zone page once find. (just increment scan in this case.) kswapd and memory migraion removes a page from list when it handles a page for

[Devel] [PATCH][for -mm] Fix and Enhancements for memory cgroup [5/6] memory cgroup and migration fix

2007-10-09 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] [PATCH][for -mm] Fix and Enhancements for memory cgroup [6/6] add force reclaim interface

2007-10-09 Thread KAMEZAWA Hiroyuki
This patch adds an interface memory.force_reclaim. Any write to this file will drop all charges in this cgroup if there is no task under. %echo 1 /../memory.force_reclaim will drop all charges of memory cgroup if cgroup's tasks is empty. This is useful to invoke rmdir() against memory

[Devel] [PATCH][for -mm] Fix and Enhancements for memory cgroup [3/6] add helper function for page_cgroup

2007-10-09 Thread KAMEZAWA Hiroyuki
This patch adds follwoing functions. - clear_page_cgroup(page, pc) - page_cgroup_assign_new_page_group(page, pc) Mainly for cleaunp. A manner check page-cgroup again after lock_page_cgroup() is implemented in straight way. Signed-off-by: KAMEZAWA Hiroyuki [EMAIL PROTECTED]

[Devel] Re: irq0 stops working

2007-10-09 Thread Thomas Gleixner
On Tue, 9 Oct 2007, Vasily Averin wrote: On one of our servers timer interrupts (i.e irq0) are stops working. As result any kernel timers do not triggers and tasks waiting some signals from timers hangs forever. Which kernel version ? Most noticeable effect of this situation is that any

[Devel] Re: [PATCH][for -mm] Fix and Enhancements for memory cgroup [0/6] intro

2007-10-09 Thread Balbir Singh
KAMEZAWA Hiroyuki wrote: Hi, Balbir-san This is a patch set against memory cgroup I have now. Reflected comments I got. = [1] charge refcnt fix patch - avoid charging against a page which is being uncharged. [2] fix-err-handling patch -

[Devel] Re: [PATCH][for -mm] Fix and Enhancements for memory cgroup [1/6] fix refcnt race in charge/uncharge

2007-10-09 Thread Balbir Singh
KAMEZAWA Hiroyuki wrote: The logic of uncharging is - decrement refcnt - lock page cgroup - remove page cgroup. But the logic of charging is - lock page cgroup - increment refcnt - return. Then, one charge will be added to a page_cgroup under being removed. This makes no big trouble

[Devel] Re: [PATCH][for -mm] Fix and Enhancements for memory cgroup [3/6] add helper function for page_cgroup

2007-10-09 Thread Balbir Singh
KAMEZAWA Hiroyuki wrote: This patch adds follwoing functions. - clear_page_cgroup(page, pc) - page_cgroup_assign_new_page_group(page, pc) Mainly for cleaunp. A manner check page-cgroup again after lock_page_cgroup() is implemented in straight way. Signed-off-by: KAMEZAWA

[Devel] Re: [PATCH][for -mm] Fix and Enhancements for memory cgroup [3/6] add helper function for page_cgroup

2007-10-09 Thread KAMEZAWA Hiroyuki
On Tue, 09 Oct 2007 16:39:48 +0530 Balbir Singh [EMAIL PROTECTED] wrote: +static inline int +page_cgroup_assign_new_page_cgroup(struct page *page, struct page_cgroup *pc) +{ + int ret = 0; + + lock_page_cgroup(page); + if (!page_get_page_cgroup(page)) +

[Devel] Re: [PATCH][NET-2.6.24] Remove double dev-flags checking when calling dev_close()

2007-10-09 Thread Pavel Emelyanov
Jeff Garzik wrote: Pavel Emelyanov wrote: The unregister_netdevice() and dev_change_net_namespace() both check for dev-flags to be IFF_UP before calling the dev_close(), but the dev_close() checks for IFF_UP itself, so remove those unneeded checks. Signed-off-by: Pavel Emelyanov [EMAIL

[Devel] [PATCH][NETNS] Don't memset() netns to zero manually

2007-10-09 Thread Pavel Emelyanov
The newly created net namespace is set to 0 with memset() in setup_net(). The setup_net() is also called for the init_net_ns(), which is zeroed naturally as a global var. So remove this memset and allocate new nets with the kmem_cache_zalloc(). Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED]

[Devel] [PATCH][NETNS] Make ifindex generation per-namespace

2007-10-09 Thread Pavel Emelyanov
Currently indexes for netdevices come sequentially one by one, and the same stays true even for devices that are created for namespaces. Side effects of this are: * lo device has not 1 index in a namespace. This may break some userspace that relies on it (and AFAIR something really broke

[Devel] Re: [PATCH][NET-2.6.24] Remove double dev-flags checking when calling dev_close()

2007-10-09 Thread Jeff Garzik
Pavel Emelyanov wrote: The unregister_netdevice() and dev_change_net_namespace() both check for dev-flags to be IFF_UP before calling the dev_close(), but the dev_close() checks for IFF_UP itself, so remove those unneeded checks. Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED] --- diff

[Devel] Re: [PATCH][for -mm] Fix and Enhancements for memory cgroup [4/6] avoid handling !LRU page in mem_cgroup_isolate_pages

2007-10-09 Thread Balbir Singh
KAMEZAWA Hiroyuki wrote: This patch makes mem_cgroup_isolate_pages() to be - ignore !PageLRU pages. - fixes the bug that it makes no progress if page_zone(page) != zone page once find. (just increment scan in this case.) kswapd and memory migraion removes a page from list when it

[Devel] Re: [PATCH][NETNS] Make ifindex generation per-namespace

2007-10-09 Thread Daniel Lezcano
Pavel Emelyanov wrote: Currently indexes for netdevices come sequentially one by one, and the same stays true even for devices that are created for namespaces. Side effects of this are: * lo device has not 1 index in a namespace. This may break some userspace that relies on it (and AFAIR

[Devel] [PATCH 0/6][NET-2.6.24] Consolidate private allocations in seq files

2007-10-09 Thread Pavel Emelyanov
Many (very many) seq files in net/ allocate some private data to use it later (mostly for iteration state). All this code was obviously get using copy-paste method, so move it into one place. Almost all of these places either set this private to 0, or keep uninitialized. Some places, however,

[Devel] [PATCH 1/6][NET-2.6.24] Introduce the seq_open_private()

2007-10-09 Thread Pavel Emelyanov
This function allocates the zeroed chunk of memory and call seq_open(). The __seq_open_private() helper returns the allocated memory to make it possible for the caller to initialize it. Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED] --- diff --git a/fs/seq_file.c b/fs/seq_file.c index

[Devel] [PATCH 2/6][NET-2.6.24] Make core networking code use seq_open_private

2007-10-09 Thread Pavel Emelyanov
This concerns the ipv4 and ipv6 code mostly, but also the netlink and unix sockets. The netlink code is an example of how to use the __seq_open_private() call - it saves the net namespace on this private. Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED] --- diff --git a/net/ipv4/arp.c

[Devel] [PATCH 4/6][NET-2.6.24] Make decnet code use the seq_open_private()

2007-10-09 Thread Pavel Emelyanov
Just switch to the consolidated code. Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED] Cc: Patrick Caulfield [EMAIL PROTECTED] --- diff --git a/net/decnet/dn_neigh.c b/net/decnet/dn_neigh.c index b66e3be..e851b14 100644 --- a/net/decnet/dn_neigh.c +++ b/net/decnet/dn_neigh.c @@ -580,24 +580,8

[Devel] [PATCH 5/6][NET-2.6.24] Make the IRDA use the seq_open_private()

2007-10-09 Thread Pavel Emelyanov
Just switch to the consolidated code Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED] Cc: Samuel Ortiz [EMAIL PROTECTED] --- diff --git a/net/irda/irlap.c b/net/irda/irlap.c index 3d76aaf..f3236ac 100644 --- a/net/irda/irlap.c +++ b/net/irda/irlap.c @@ -1219,29 +1219,11 @@ static const struct

[Devel] [PATCH 6/6][NET-2.6.24] Make the sunrpc use the seq_open_private()

2007-10-09 Thread Pavel Emelyanov
Just switch to the consolidated code. Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED] Cc: Neil Brown [EMAIL PROTECTED] --- diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index ebe344f..8e05557 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c @@ -1218,23 +1218,15 @@ static const

[Devel] Re: [PATCH][for -mm] Fix and Enhancements for memory cgroup [5/6] memory cgroup and migration fix

2007-10-09 Thread Balbir Singh
KAMEZAWA Hiroyuki wrote: 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

[Devel] [patch 1/2][NETNS49][IPV4][UDPLITE] add udp_proc_register per net

2007-10-09 Thread Daniel Lezcano
This patch add a pernet subsystem to register /proc/net/udplite per network namespace. Signed-off-by: Daniel Lezcano [EMAIL PROTECTED] --- net/ipv4/udplite.c | 24 ++-- 1 file changed, 22 insertions(+), 2 deletions(-) Index: linux-2.6-netns/net/ipv4/udplite.c

[Devel] [patch 0/2][NETNS49][IPV4][UDPLITE] make udplite protocol per namespace

2007-10-09 Thread Daniel Lezcano
The following patches make the udplite protocol per network namespace. They are only a couple of patches because the core udp engine per network namespace is already done and udplite relies on it. -- ___ Containers mailing list [EMAIL PROTECTED]

[Devel] [patch 2/2][NETNS49][IPV4][UDPLITE] activate udplite per network namespace

2007-10-09 Thread Daniel Lezcano
This patch activates the udplite protocol for multiple network namespaces. Signed-off-by: Daniel Lezcano [EMAIL PROTECTED] --- net/ipv4/udplite.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) Index: linux-2.6-netns/net/ipv4/udplite.c

[Devel] Re: [PATCH][NETNS] Make ifindex generation per-namespace

2007-10-09 Thread Eric W. Biederman
Pavel Emelyanov [EMAIL PROTECTED] writes: Currently indexes for netdevices come sequentially one by one, and the same stays true even for devices that are created for namespaces. Side effects of this are: * lo device has not 1 index in a namespace. This may break some userspace that

[Devel] Re: [PATCH][NETNS] Make ifindex generation per-namespace

2007-10-09 Thread Eric W. Biederman
David Stevens [EMAIL PROTECTED] writes: Sorry if this is a dumb question, but what is the model you intend for SNMP? Do you want each namespace to be its own virtual machine with its own, separate MIB? Each network namespace appears to user space as a completely separate network stack. So

[Devel] Re: [PATCH][for -mm] Fix and Enhancements for memory cgroup [6/6] add force reclaim interface

2007-10-09 Thread Balbir Singh
KAMEZAWA Hiroyuki wrote: This patch adds an interface memory.force_reclaim. Any write to this file will drop all charges in this cgroup if there is no task under. %echo 1 /../memory.force_reclaim Looks like a good name, do you think system administrators would find force_empty more

[Devel] Re: [PATCH][NETNS] Don't memset() netns to zero manually

2007-10-09 Thread David Miller
From: Pavel Emelyanov [EMAIL PROTECTED] Date: Tue, 09 Oct 2007 15:48:19 +0400 The newly created net namespace is set to 0 with memset() in setup_net(). The setup_net() is also called for the init_net_ns(), which is zeroed naturally as a global var. So remove this memset and allocate new

[Devel] Re: [PATCH][NETNS] Make ifindex generation per-namespace

2007-10-09 Thread David Miller
From: [EMAIL PROTECTED] (Eric W. Biederman) Date: Tue, 09 Oct 2007 11:43:58 -0600 David Stevens [EMAIL PROTECTED] writes: Sorry if this is a dumb question, but what is the model you intend for SNMP? Do you want each namespace to be its own virtual machine with its own, separate MIB?

[Devel] Re: [PATCH][NETNS] Make ifindex generation per-namespace

2007-10-09 Thread David Miller
From: David Stevens [EMAIL PROTECTED] Date: Tue, 9 Oct 2007 09:18:25 -0700 Ifindex's have to uniquely identify the interface (virtual or otherwise) to remote queriers (not just local applications), so unless you pay the price of separating all the SNMP MIBs per namespace too, it seems you'll

[Devel] [PATCH] namespaces: introduce sys_hijack (v4)

2007-10-09 Thread Serge E. Hallyn
From 945fe66259cd0cfdc2fe846287b7821e329a558c Mon Sep 17 00:00:00 2001 From: [EMAIL PROTECTED] [EMAIL PROTECTED](none) Date: Tue, 9 Oct 2007 08:30:30 -0700 Subject: [PATCH] namespaces: introduce sys_hijack (v4) Move most of do_fork() into a new do_fork_task() which acts on a new argument, task,

[Devel] Re: [PATCH][NETNS] Make ifindex generation per-namespace

2007-10-09 Thread David Miller
From: Pavel Emelyanov [EMAIL PROTECTED] Date: Tue, 09 Oct 2007 16:19:25 +0400 Currently indexes for netdevices come sequentially one by one, and the same stays true even for devices that are created for namespaces. Side effects of this are: * lo device has not 1 index in a namespace.

[Devel] Re: [PATCH][NETNS] Make ifindex generation per-namespace

2007-10-09 Thread Eric W. Biederman
David Miller [EMAIL PROTECTED] writes: From: [EMAIL PROTECTED] (Eric W. Biederman) Date: Tue, 09 Oct 2007 11:43:58 -0600 David Stevens [EMAIL PROTECTED] writes: Sorry if this is a dumb question, but what is the model you intend for SNMP? Do you want each namespace to be its own virtual

[Devel] Re: [PATCH][NETNS] Make ifindex generation per-namespace

2007-10-09 Thread David Miller
From: [EMAIL PROTECTED] (Eric W. Biederman) Date: Tue, 09 Oct 2007 15:00:10 -0600 Regardless it is early yet and there is plenty of time to revisit this after we solved the easier and less controversial problems. Ok. I would encourage you to learn how the SNMP mibs work, and whether they

[Devel] Re: [PATCH][for -mm] Fix and Enhancements for memory cgroup [1/6] fix refcnt race in charge/uncharge

2007-10-09 Thread YAMAMOTO Takashi
The logic of uncharging is - decrement refcnt - lock page cgroup - remove page cgroup. But the logic of charging is - lock page cgroup - increment refcnt - return. Then, one charge will be added to a page_cgroup under being removed. This makes no big trouble (like panic) but one charge

[Devel] Re: [PATCHSET 3/4] sysfs: divorce sysfs from kobject and driver model

2007-10-09 Thread Greg KH
On Fri, Oct 05, 2007 at 06:44:04AM -0600, Eric W. Biederman wrote: Greg KH [EMAIL PROTECTED] writes: I would be interested in seeing what your patches look like. Sure. I don't think that we should take any more sysfs changes for 2.6.24 as we do have a lot of them right now, and I

[Devel] Re: [PATCHSET 3/4] sysfs: divorce sysfs from kobject and driver model

2007-10-09 Thread Greg KH
On Fri, Oct 05, 2007 at 06:12:41AM -0600, Eric W. Biederman wrote: Greg KH [EMAIL PROTECTED] writes: Also fun is that the dev file implementation needs to be able to report different major:minor numbers based on which mount of sysfs we are dealing with. Um, no, that's not going

[Devel] Re: [PATCH][for -mm] Fix and Enhancements for memory cgroup [1/6] fix refcnt race in charge/uncharge

2007-10-09 Thread KAMEZAWA Hiroyuki
On Wed, 10 Oct 2007 07:31:38 +0900 (JST) [EMAIL PROTECTED] (YAMAMOTO Takashi) wrote: - atomic_inc(pc-ref_cnt); - goto done; + if (unlikely(!atomic_inc_not_zero(pc-ref_cnt))) { + /* this page is under being uncharge ? */ +

[Devel] Re: [PATCH][for -mm] Fix and Enhancements for memory cgroup [3/6] add helper function for page_cgroup

2007-10-09 Thread KAMEZAWA Hiroyuki
On Tue, 9 Oct 2007 20:26:42 +0900 KAMEZAWA Hiroyuki [EMAIL PROTECTED] wrote: + */ + if (clear_page_cgroup(page, pc) == pc) { OK.. so we've come so far and seen that pc has changed underneath us, what do we do with this pc? Hmm... How about this ? == if

[Devel] Re: [RFC] [PATCH] memory controller statistics

2007-10-09 Thread YAMAMOTO Takashi
hi, i implemented some statistics for your memory controller. here's a new version. changes from the previous: - make counters per-cpu. - value *= PAGE_SIZE YAMAMOTO Takashi --- linux-2.6.23-rc8-mm2-stat/mm/memcontrol.c.BACKUP2007-10-01 17:19:57.0 +0900 +++

[Devel] Re: [PATCH][NET-2.6.24] Remove double dev-flags checking when calling dev_close()

2007-10-09 Thread Herbert Xu
Jeff Garzik [EMAIL PROTECTED] wrote: One side effect of this patch: might_sleep() is now called unconditionally. That would be seem to be a good thing :) -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmVHI~} [EMAIL PROTECTED] Home Page: http://gondor.apana.org.au/~herbert/