[Devel] [PATCH rh7 3/4] gfp: add __get_free_kmem_pages helper

2015-08-26 Thread Vladimir Davydov
Works exactly as __get_free_pages except it also tries to charge newly allocated pages to memcg/kmem. It will be used by the next patch. Signed-off-by: Vladimir Davydov vdavy...@parallels.com --- include/linux/gfp.h | 1 + mm/page_alloc.c | 12 2 files changed, 13 insertions(+)

[Devel] [PATCH rh7 4/4] arch: x86: charge page tables to memcg/kmem

2015-08-26 Thread Vladimir Davydov
Note the implementation is as simple as possible - I only insert memcg_kmem_newpage_charge and memcg_kmem_uncharge_pages to pte/pmd/pud/pgd alloc/free paths. There is no precharging! If our performance team reports a noticeable performance degradation due to this, I'll implement batched

[Devel] [PATCH rh7 0/4] memcg/kmem: account some non-slab objects

2015-08-26 Thread Vladimir Davydov
This patch set implements memcg/kmem accounting for vmalloc, pipe buffers, and page tables. I'll probably try to submit these patches (slightly modified) upstream after v4.2 has been released. Vladimir Davydov (4): vmalloc: account to memcg/kmem fs: account anon pipe buffers to memcg/kmem

Re: [Devel] [PATCH rh7] ve: Add a ability to show ve.mount_opts

2015-08-26 Thread Maxim Patlasov
On 08/26/2015 07:50 AM, Kirill Tkhai wrote: On 26.08.2015 17:40, Konstantin Khorenko wrote: On 07/20/2015 10:05 PM, Maxim Patlasov wrote: On 07/14/2015 01:27 AM, Kirill Tkhai wrote: В Пн, 13/07/2015 в 12:38 -0700, Maxim Patlasov пишет: On 07/08/2015 04:50 AM, Kirill Tkhai wrote: ... Why

[Devel] [PATCH rh7 2/4] fs: account anon pipe buffers to memcg/kmem

2015-08-26 Thread Vladimir Davydov
https://jira.sw.ru/browse/PSBM-39052 Signed-off-by: Vladimir Davydov vdavy...@parallels.com --- fs/pipe.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/fs/pipe.c b/fs/pipe.c index 46f1ab264a4c..a09175176e37 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -223,9

[Devel] [PATCH rh7 1/4] vmalloc: account to memcg/kmem

2015-08-26 Thread Vladimir Davydov
https://jira.sw.ru/browse/PSBM-33839 Signed-off-by: Vladimir Davydov vdavy...@parallels.com --- mm/vmalloc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 7fbc92aa03bc..9ce5142b44cb 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@

Re: [Devel] [PATCH RH7] sysfs: propagate access to all sub-directories hierarchically

2015-08-26 Thread Vladimir Davydov
On Wed, Aug 26, 2015 at 01:28:48PM +0300, Pavel Tikhomirov wrote: Docker test TestGetContainerStats asks docker to get network stats of container. Docker tries to get network devices stats like count of bytes or packets sent/received from: /sys/class/net/[device_name]/statistics/* We showed

[Devel] [PATCH RH7] sysfs: propagate access to all sub-directories hierarchically

2015-08-26 Thread Pavel Tikhomirov
Docker test TestGetContainerStats asks docker to get network stats of container. Docker tries to get network devices stats like count of bytes or packets sent/received from: /sys/class/net/[device_name]/statistics/* We showed only statistics directory but not it's content as namespace tag check

[Devel] [PATCH 1/2] userns: Allow PR_CAPBSET_DROP in a user namespace.

2015-08-26 Thread Andrew Vagin
From: Eric W. Biederman ebied...@xmission.com As the capabilites and capability bounding set are per user namespace properties it is safe to allow changing them with just CAP_SETPCAP permission in the user namespace. Acked-by: Serge Hallyn serge.hal...@canonical.com Tested-by: Richard Weinberger

[Devel] [PATCH 2/2] fs: allow to mount devtmpfs in a non-root userns

2015-08-26 Thread Andrew Vagin
devtmpfs is virtualized, so it has to be secure. Signed-off-by: Andrew Vagin ava...@openvz.org --- drivers/base/devtmpfs.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c index c28e42c..66c8dd2 100644 ---

Re: [Devel] [PATCH 2/2] fs: allow to mount devtmpfs in a non-root userns

2015-08-26 Thread Vladimir Davydov
On Wed, Aug 26, 2015 at 02:40:20PM +0400, Andrew Vagin wrote: devtmpfs is virtualized, so it has to be secure. Signed-off-by: Andrew Vagin ava...@openvz.org Reviewed-by: Vladimir Davydov vdavy...@parallels.com ___ Devel mailing list Devel@openvz.org

[Devel] [PATCH rh7] net: udpv6: release memcg on destroy

2015-08-26 Thread Vladimir Davydov
In case of udpv6 we never release the memcg reference taken in udpv6_prot-init. This leads to memcg leak. Fix it by calling sock_release_memcg from udpv6_prot-destroy. https://jira.sw.ru/browse/PSBM-39084 Fixes: ee3396bb65bf (udp: Charge ingress buffers into cg memory) Signed-off-by: Vladimir

[Devel] [PATCH rh7] crypto/ghash-intel: specify context size for ghash async algorithm

2015-08-26 Thread Andrey Ryabinin
Currently context size (cra_ctxsize) doesn't specified for ghash_async_alg. Which means it's zero. Thus crypto_create_tfm() doesn't allocate needed space for ghash_async_ctx, so any read/write to ctx becomes invalid. https://jira.sw.ru/browse/PSBM-38669 Signed-off-by: Andrey Ryabinin

Re: [Devel] [PATCH rh7] ve: Add a ability to show ve.mount_opts

2015-08-26 Thread Konstantin Khorenko
On 07/20/2015 10:05 PM, Maxim Patlasov wrote: On 07/14/2015 01:27 AM, Kirill Tkhai wrote: В Пн, 13/07/2015 в 12:38 -0700, Maxim Patlasov пишет: On 07/08/2015 04:50 AM, Kirill Tkhai wrote: ... Why do we need to show hidden options to CT' user? He/she doesn't see .balloon file, so it doesn't

Re: [Devel] [PATCH rh7] ve: Add a ability to show ve.mount_opts

2015-08-26 Thread Kirill Tkhai
On 26.08.2015 17:40, Konstantin Khorenko wrote: On 07/20/2015 10:05 PM, Maxim Patlasov wrote: On 07/14/2015 01:27 AM, Kirill Tkhai wrote: В Пн, 13/07/2015 в 12:38 -0700, Maxim Patlasov пишет: On 07/08/2015 04:50 AM, Kirill Tkhai wrote: ... Why do we need to show hidden options to CT'