Re: [Devel] [PATCH 1/2] memcg: fix memcg_size() calculation

2013-12-17 Thread Michal Hocko
On Tue 17-12-13 11:48:20, Glauber Costa wrote: On Mon, Dec 16, 2013 at 8:47 PM, Michal Hocko mho...@suse.cz wrote: On Sat 14-12-13 12:15:33, Vladimir Davydov wrote: The mem_cgroup structure contains nr_node_ids pointers to mem_cgroup_per_node objects, not the objects themselves. Ouch!

Re: [Devel] [PATCH 1/2] e1000: fix lockdep warning in e1000_reset_task

2013-12-17 Thread Jeff Kirsher
On Fri, 2013-11-22 at 12:20 +0400, Vladimir Davydov wrote: The patch fixes the following lockdep warning, which is 100% reproducible on network restart: == [ INFO: possible circular locking dependency detected ] 3.12.0+ #47 Tainted: GF

Re: [Devel] [PATCH 2/2] e1000: fix possible reset_task running after adapter down

2013-12-17 Thread Jeff Kirsher
On Fri, 2013-11-22 at 12:20 +0400, Vladimir Davydov wrote: On e1000_down(), we should ensure every asynchronous work is canceled before proceeding. Since the watchdog_task can schedule other works apart from itself, it should be stopped first, but currently it is stopped after the reset_task.

Re: [Devel] [PATCH] memcg: remove KMEM_ACCOUNTED_ACTIVATED

2013-12-17 Thread Glauber Costa
On Mon, Dec 2, 2013 at 10:15 PM, Michal Hocko mho...@suse.cz wrote: [CCing Glauber - please do so in other posts for kmem related changes] On Mon 02-12-13 17:08:13, Vladimir Davydov wrote: The KMEM_ACCOUNTED_ACTIVATED was introduced by commit a8964b9b (memcg: use static branches when code not

Re: [Devel] [PATCH] memcg: remove KMEM_ACCOUNTED_ACTIVATED

2013-12-17 Thread Glauber Costa
On Mon, Dec 2, 2013 at 10:51 PM, Michal Hocko mho...@suse.cz wrote: On Mon 02-12-13 22:26:48, Glauber Costa wrote: On Mon, Dec 2, 2013 at 10:15 PM, Michal Hocko mho...@suse.cz wrote: [CCing Glauber - please do so in other posts for kmem related changes] On Mon 02-12-13 17:08:13, Vladimir

Re: [Devel] [PATCH] memcg: remove KMEM_ACCOUNTED_ACTIVATED

2013-12-17 Thread Glauber Costa
On Mon, Dec 2, 2013 at 11:21 PM, Vladimir Davydov vdavy...@parallels.com wrote: On 12/02/2013 10:26 PM, Glauber Costa wrote: On Mon, Dec 2, 2013 at 10:15 PM, Michal Hocko mho...@suse.cz wrote: [CCing Glauber - please do so in other posts for kmem related changes] On Mon 02-12-13 17:08:13,

Re: [Devel] [PATCH] memcg: remove KMEM_ACCOUNTED_ACTIVATED

2013-12-17 Thread Glauber Costa
Hi, Glauber Hi. In memcg_update_kmem_limit() we do the whole process of limit initialization under a mutex so the situation we need protection from in tcp_update_limit() is impossible. BTW once set, the 'activated' flag is never cleared and never checked alone, only along with the 'active'

Re: [Devel] [PATCH] memcg: remove KMEM_ACCOUNTED_ACTIVATED

2013-12-17 Thread Glauber Costa
Could you do something clever with just one flag? Probably yes. But I doubt it would be that much cleaner, this is just the way that patching sites work. Thank you for spending your time to listen to me. Don't worry! I thank you for carrying this forward. Let me try to explain what is

Re: [Devel] [PATCH v13 00/16] kmemcg shrinkers

2013-12-17 Thread Glauber Costa
Please note that in contrast to previous versions this patch-set implements slab shrinking only when we hit the user memory limit so that kmem allocations will still fail if we are below the user memory limit, but close to the kmem limit. This is, because the implementation of kmem-only

Re: [Devel] [PATCH v13 04/16] memcg: move memcg_caches_array_size() function

2013-12-17 Thread Glauber Costa
On Mon, Dec 9, 2013 at 12:05 PM, Vladimir Davydov vdavy...@parallels.com wrote: I need to move this up a bit, and I am doing in a separate patch just to reduce churn in the patch that needs it. Signed-off-by: Vladimir Davydov vdavy...@parallels.com Reviewed-by: Glauber Costa glom...@openvz.org

Re: [Devel] [PATCH v13 05/16] vmscan: move call to shrink_slab() to shrink_zones()

2013-12-17 Thread Glauber Costa
On Mon, Dec 9, 2013 at 12:05 PM, Vladimir Davydov vdavy...@parallels.com wrote: This reduces the indentation level of do_try_to_free_pages() and removes extra loop over all eligible zones counting the number of on-LRU pages. Looks correct to me. ___

Re: [Devel] [PATCH v13 14/16] vmpressure: in-kernel notifications

2013-12-17 Thread Glauber Costa
On Mon, Dec 9, 2013 at 12:05 PM, Vladimir Davydov vdavy...@parallels.com wrote: From: Glauber Costa glom...@openvz.org During the past weeks, it became clear to us that the shrinker interface It has been more than a few weeks by now =) ___ Devel

Re: [Devel] [PATCH v13 13/16] vmscan: take at least one pass with shrinkers

2013-12-17 Thread Glauber Costa
On Tue, Dec 10, 2013 at 3:50 PM, Vladimir Davydov vdavy...@parallels.com wrote: On 12/10/2013 08:18 AM, Dave Chinner wrote: On Mon, Dec 09, 2013 at 12:05:54PM +0400, Vladimir Davydov wrote: From: Glauber Costa glom...@openvz.org In very low free kernel memory situations, it may be the case

Re: [Devel] Race in memcg kmem?

2013-12-17 Thread Glauber Costa
On Tue, Dec 10, 2013 at 5:59 PM, Vladimir Davydov vdavy...@parallels.com wrote: Hi, Looking through the per-memcg kmem_cache initialization code, I have a bad feeling that it is prone to a race. Before getting to fixing it, I'd like to ensure this race is not only in my imagination. Here it

Re: [Devel] [PATCH v13 11/16] mm: list_lru: add per-memcg lists

2013-12-17 Thread Glauber Costa
OK, as far as I can tell, this is introducing a per-node, per-memcg LRU lists. Is that correct? If so, then that is not what Glauber and I originally intended for memcg LRUs. per-node LRUs are expensive in terms of memory and cross multiplying them by the number of memcgs in a system was not

Re: [Devel] [PATCH 1/2] memcg: fix memcg_size() calculation

2013-12-17 Thread Glauber Costa
On Mon, Dec 16, 2013 at 8:47 PM, Michal Hocko mho...@suse.cz wrote: On Sat 14-12-13 12:15:33, Vladimir Davydov wrote: The mem_cgroup structure contains nr_node_ids pointers to mem_cgroup_per_node objects, not the objects themselves. Ouch! This is 2k per node which is wasted. What a shame I