[Devel] [PATCH rh7] mm/tcache: close race between attach and invalidate page

2017-04-07 Thread Andrey Ryabinin
age() and addition to the lru list. So if we extract the page from radix_tree now we can be sure that it is already on lru list and page refcounter increased. https://jira.sw.ru/browse/PSBM-63197 Signed-off-by: Andrey Ryabinin --- mm/tcache.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions

[Devel] [PATCH rh7] fs/cleancache: fix data invalidation in the cleancache during direct_io

2017-04-11 Thread Andrey Ryabinin
calling invalidate_inode_pages2_range() regardless of nrpages value. And if nrpages is zero, bail out from invalidate_inode_pages2_range() only after cleancache_invalidate_inode(), so that we invalidate cleancache but still avoid pointless page cache lookups. https://jira.sw.ru/browse/PSBM-63908 Signed-off-by: Andrey

Re: [Devel] [PATCH rh7] fs/cleancache: fix data invalidation in the cleancache during direct_io

2017-04-12 Thread Andrey Ryabinin
On 04/11/2017 08:08 PM, Alexey Kuznetsov wrote: > Hello! > > Good job! > > Before submitting this to mainstream look > at truncate_inode_pages. > > It has condition: > > if (mapping->nrpages == 0 && mapping->nrexceptional == 0) > return; > > I have no idea what are those except

[Devel] [PATCH rh7 3/3] fs/block_dev: always invalidate cleancache in invalidate_bdev()

2017-04-12 Thread Andrey Ryabinin
invalidate_bdev() calls cleancache_invalidate_inode() iff ->nrpages != 0 which doen't make any sense. Make invalidate_bdev() always invalidate cleancache data. https://jira.sw.ru/browse/PSBM-63908 Signed-off-by: Andrey Ryabinin --- fs/block_dev.c | 12 ++-- 1 file changed, 6 in

[Devel] [PATCH rh7 2/3] cleancache: avoid pointless cleancache_invalidate_inode() calls.

2017-04-12 Thread Andrey Ryabinin
/browse/PSBM-63908 Signed-off-by: Andrey Ryabinin --- mm/truncate.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/mm/truncate.c b/mm/truncate.c index ce4b1d8..1db0425 100644 --- a/mm/truncate.c +++ b/mm/truncate.c @@ -285,9 +285,8 @@ void truncate_inode_pages_range

[Devel] [PATCH rh7 v2 1/3] fs/cleancache: fix data invalidation in the cleancache during direct_io

2017-04-12 Thread Andrey Ryabinin
calling invalidate_inode_pages2_range() regardless of nrpages value. And if nrpages is zero, bail out from invalidate_inode_pages2_range() only after cleancache_invalidate_inode(), so that we invalidate cleancache but still avoid pointless page cache lookups. https://jira.sw.ru/browse/PSBM-63908 Signed-off-by: Andrey

Re: [Devel] [PATCH rh7] fs/cleancache: fix data invalidation in the cleancache during direct_io

2017-04-12 Thread Andrey Ryabinin
On 04/12/2017 05:45 PM, Andrey Ryabinin wrote: > On 04/11/2017 08:08 PM, Alexey Kuznetsov wrote: >> Hello! >> >> Good job! >> >> Before submitting this to mainstream look >> at truncate_inode_pages. >> >> It has condition: >> &g

[Devel] [PATCH rh7] mm/tcache: make tcache work again

2017-04-18 Thread Andrey Ryabinin
cg reclaim and use it in tcache to distinguish global recalaim from per-memcg recalim. Signed-off-by: Andrey Ryabinin --- include/linux/sched.h | 1 + mm/tcache.c | 2 +- mm/vmscan.c | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/linux/sched.h

[Devel] [PATCH rh7] mm/tswap: make tswap work again

2017-04-18 Thread Andrey Ryabinin
lso set during memcg reclaim. Use new PF_MEMCG_RECLAIM instead of PF_MEMALLOC to identify per-memcg recalim to avoid populating tswap during global reclaim Signed-off-by: Andrey Ryabinin --- mm/tswap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/tswap.c b/mm/tswap.c in

[Devel] [PATCH rh7 2/4] ms/ext4: factor out determining of hole size

2017-04-27 Thread Andrey Ryabinin
hole in the extent tree as we will need this information in ext4_ext_map_blocks() as well. Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o https://jira.sw.ru/browse/PSBM-65551 Signed-off-by: Andrey Ryabinin --- fs/ext4/extents.c

[Devel] [PATCH rh7 4/4] ms/ext4: more efficient SEEK_DATA implementation

2017-04-27 Thread Andrey Ryabinin
extents. Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o https://jira.sw.ru/browse/PSBM-65551 Signed-off-by: Andrey Ryabinin --- fs/ext4/ext4.h | 3 ++ fs/ext4/file.c | 97 + fs/ext4/inode.c

[Devel] [PATCH rh7 1/4] Revert "ext4: fix seek_data soft lookup on sparse files"

2017-04-27 Thread Andrey Ryabinin
This reverts commit a8b68fd3911361dbaf66da6786eb3a6d472177c6. We are going to apply a better fix for seek_data slowness, so this commit is no longer needed. https://jira.sw.ru/browse/PSBM-65551 Signed-off-by: Andrey Ryabinin --- fs/ext4/file.c | 12 +--- 1 file changed, 1 insertion

[Devel] [PATCH rh7 3/4] ms/ext4: return hole from ext4_map_blocks()

2017-04-27 Thread Andrey Ryabinin
Ts'o https://jira.sw.ru/browse/PSBM-65551 Signed-off-by: Andrey Ryabinin --- fs/ext4/extents.c | 11 +-- fs/ext4/indirect.c | 19 +-- fs/ext4/inode.c| 15 ++- 3 files changed, 36 insertions(+), 9 deletions(-) diff --git a/fs/ext4/extents.c b/fs

Re: [Devel] [PATCH rh7] mm/zswap: fix potential deadlock in zswap_frontswap_store()

2017-05-12 Thread Andrey Ryabinin
; Konstantin Khorenko, > Virtuozzo Linux Kernel Team > > On 04/03/2017 12:52 PM, Konstantin Khorenko wrote: >> On 03/31/2017 06:34 PM, Andrey Ryabinin wrote: >>> >>> >>> On 03/29/2017 03:32 PM, Konstantin Khorenko wrote: >>>> Andrey, did you send it t

[Devel] [PATCH rh7 2/2] ms/ksm: fix use after free with merge_across_nodes = 0

2017-05-16 Thread Andrey Ryabinin
chain, when in fact it was freed. Notably stable_node_chain_add_dup(page_node, stable_node) would run on a stable stable_node. Andrey Ryabinin found the source of the use after free in chain_prune(). Reported-by: Andrey Ryabinin Reported-by: Evgheni Dereveanchin Signed-off-by: Andrea Arcangeli

[Devel] [PATCH rh7 1/2] Revert "rh/ksm: Revert rh patch "introduce ksm_max_page_sharing per page deduplication limit""

2017-05-16 Thread Andrey Ryabinin
ned-off-by: Andrey Ryabinin --- mm/ksm.c | 732 +-- 1 file changed, 666 insertions(+), 66 deletions(-) diff --git a/mm/ksm.c b/mm/ksm.c index ecdd302fbe78..5311d3c38124 100644 --- a/mm/ksm.c +++ b/mm/ksm.c @@ -126,9 +126,12 @@ struc

Re: [Devel] [PATCH 00/11] x86: C/R for ia32 tasks

2017-05-23 Thread Andrey Ryabinin
troduce mmap_compat_base() for 32-bit mmap() > ms/x86/mm: Make mmap(MAP_32BIT) work correctly > ms/x86/hugetlb: Adjust to the new native/compat mmap bases > x86/mm: Make in_compat_syscall() work during exec > > Kees Cook (2): > ms/x86: standardize mmap_rnd() usage > m

[Devel] [PATCH rh7 1/2] vdso: virtualized monotonic gettime through vdso

2017-05-24 Thread Andrey Ryabinin
onotonic time. Make uts_arch_setup_additional_pages()/uts_prep_vdso_pages_locked() to always setup new vdso, since previous policy to setup vdso only if uts_ns->name.release wouldn't work for virtualized __vdso_clock_gettime() https://jira.sw.ru/browse/PSBM-66451 Signed-off-by: Andrey Ry

[Devel] [PATCH rh7 2/2] Revert "x86: vdso: add sysctl to disable vdso for gettime monotonic"

2017-05-24 Thread Andrey Ryabinin
This reverts commit 97fb49e1c44ce50390d1aa27bc1badda2962b68d. We don't need this sysctl anymore because __vdso_gettime for monotonic clocks in containers works fine now. https://jira.sw.ru/browse/PSBM-66451 Signed-off-by: Andrey Ryabinin --- arch/x86/include/asm/vgtod.h | 1 - arc

Re: [Devel] [PATCH rh7 1/2] vdso: virtualized monotonic gettime through vdso

2017-05-24 Thread Andrey Ryabinin
On 05/24/2017 07:29 PM, Dmitry Safonov wrote: > On 05/24/2017 06:21 PM, Andrey Ryabinin wrote: >> We already have infrastructure for virtualized vdso, however we use >> it only to change LINUX_VERSION_NAME in container. Simply store container's >> start time - ve->st

Re: [Devel] [PATCH rh7 1/2] vdso: virtualized monotonic gettime through vdso

2017-05-24 Thread Andrey Ryabinin
On 05/24/2017 07:38 PM, Dmitry Safonov wrote: > On 05/24/2017 07:34 PM, Andrey Ryabinin wrote: >> >> >> On 05/24/2017 07:29 PM, Dmitry Safonov wrote: >>> On 05/24/2017 06:21 PM, Andrey Ryabinin wrote: >>>> We already have infrastructure for virtualized v

Re: [Devel] [PATCH rh7 1/2] vdso: virtualized monotonic gettime through vdso

2017-05-25 Thread Andrey Ryabinin
On 05/25/2017 11:42 AM, Dmitry Safonov wrote: > On 05/24/2017 07:45 PM, Dmitry Safonov wrote: >> On 05/24/2017 07:45 PM, Andrey Ryabinin wrote: >>> >>> >>> On 05/24/2017 07:38 PM, Dmitry Safonov wrote: >>>> On 05/24/2017 07:34 PM, Andrey Ryabinin

Re: [Devel] [PATCH] net: fix silly mistake with TCP cgroup memory pressure check

2017-05-26 Thread Andrey Ryabinin
. > > https://jira.sw.ru/browse/PSBM-66468 > > Signed-off-by: Stanislav Kinsburskiy Acked-by: Andrey Ryabinin > --- > include/net/tcp.h |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/net/tcp.h b/include/net/tcp.h > index d64d30b..f2b484

[Devel] [PATCH rh7] block/ploop: Add resched points in ploop thread.

2017-05-29 Thread Andrey Ryabinin
] [] ploop_req_state_process+0x1f7d/0x3870 [ploop] [] ploop_thread+0x66e/0x1170 [ploop] [] kthread+0x1e6/0x250 [] ret_from_fork+0x58/0x90 Add cond_resched() on each iteration of the ploop_thread() to fix that. https://jira.sw.ru/browse/PSBM-66617 Signed-off-by: Andrey Ryabinin --- drivers/block/ploop/dev.c | 22

[Devel] [PATCH rh7] ms/mm: prevent KASAN false positives in kmemleak

2017-05-31 Thread Andrey Ryabinin
-1-git-send-email-dvyu...@google.com Signed-off-by: Dmitry Vyukov Acked-by: Catalin Marinas Cc: Andrey Ryabinin Cc: Alexander Potapenko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Found during investigating https://jira.sw.ru/browse/PSBM-66617 Signed-off-by: Andrey Ryabinin

[Devel] [PATCH rh7] mm/memcg, ub: fix overflow in mem_cgroup_apply_beancounter()

2017-06-01 Thread Andrey Ryabinin
ximal possible value for page counters. Reported-by: Vladimir Meshkov Signed-off-by: Andrey Ryabinin --- mm/memcontrol.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index fff4cb021b6c..66d51b7b07c5 100644 --- a/mm/memcontrol.c +++

[Devel] [PATCH rh7] ext4: add generic uevent infrastructure

2017-06-05 Thread Andrey Ryabinin
andle this situation and inform user-space about this. *Implementation: Add uevent infrastructure similar to dm uevent FS_ACTION = {MOUNT|UMOUNT|REMOUNT|ERROR|FREEZE|UNFREEZE} FS_UUID FS_NAME FS_TYPE Signed-off-by: Dmitry Monakhov https://jira.sw.ru/browse/PSBM-66618 Signed-off-by: Andrey Rya

[Devel] [PATCH rh7] ms/mm/memcontrol.c: fix the margin computation in mem_cgroup_margin()

2017-06-06 Thread Andrey Ryabinin
-27736-1-git-send-email-roy.qing...@gmail.com Signed-off-by: Li RongQing Acked-by: Vladimir Davydov Acked-by: Michal Hocko Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds https://jira.sw.ru/browse/PSBM-67076 Signed-off-by: Andrey Ryabinin --- mm/memcontrol.c |

[Devel] [PATCH rh7 v2] ext4: add generic uevent infrastructure

2017-06-07 Thread Andrey Ryabinin
andle this situation and inform user-space about this. *Implementation: Add uevent infrastructure similar to dm uevent FS_ACTION = {MOUNT|UMOUNT|REMOUNT|ERROR|FREEZE|UNFREEZE} FS_UUID FS_NAME FS_TYPE Signed-off-by: Dmitry Monakhov https://jira.sw.ru/browse/PSBM-66618 Signed-off-by: Andrey Rya

[Devel] [PATCH rh7] fs/ext4: allow container's root to change immutable attribute.

2017-06-07 Thread Andrey Ryabinin
This allows container's root to change immutable and append only attributes on files. https://jira.sw.ru/browse/PSBM-60148 Signed-off-by: Andrey Ryabinin --- fs/ext4/ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c index 117d89d

[Devel] [PATCH rh7 v3] ext4: add generic uevent infrastructure

2017-06-15 Thread Andrey Ryabinin
andle this situation and inform user-space about this. *Implementation: Add uevent infrastructure similar to dm uevent FS_ACTION = {MOUNT|UMOUNT|REMOUNT|ERROR|FREEZE|UNFREEZE} FS_UUID FS_NAME FS_TYPE Signed-off-by: Dmitry Monakhov https://jira.sw.ru/browse/PSBM-66618 Signed-off-by: Andrey Rya

[Devel] [PATCH rh7] ms/mm/list_lru.c: avoid error-path NULL pointer deref

2017-06-19 Thread Andrey Ryabinin
node[i].memcg_lrus, which is NULL. [a...@linux-foundation.org: add comment] Signed-off-by: Alexander Polakov Acked-by: Vladimir Davydov Cc: Al Viro Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds https://jira.sw.ru/browse/PSBM-67300 Signed-off-by: Andrey Ryabinin --- mm/list_lru

Re: [Devel] [PATCH rh7 v3] ext4: add generic uevent infrastructure

2017-06-20 Thread Andrey Ryabinin
On 06/20/2017 07:49 PM, Konstantin Khorenko wrote: > Kirill, Andrey, what is about Dima's comment? > We've had an offline discussion and Dima is agreed that the GFP_KERNEL is totally ok here. >> +int ext4_send_uevent(struct super_block *sb, enum ext4_event_type action) >> +{ >> +int ret;

[Devel] [PATCH rh7] ms/x86/asm/irq: Stop relying on magic JMP behavior for early_idt_handlers

2017-06-22 Thread Andrey Ryabinin
ngo Molnar Signed-off-by: Andrey Ryabinin --- arch/x86/include/asm/segment.h | 14 -- arch/x86/kernel/head64.c | 2 +- arch/x86/kernel/head_32.S | 33 ++--- arch/x86/kernel/head_64.S | 20 +++- 4 files changed, 42 insertions(

Re: [Devel] [PATCH] vdso/ia32: Revert monotonic time virtualization for ia32

2017-07-10 Thread Andrey Ryabinin
browse/PSBM-68050 > > Fixes: commit 25960eecc77e ("ve/vdso: virtualized monotonic gettime > through vdso") and commit 481382a5f63e ("vdso32: Fix monotonic time > virtualization for ia32)". > Cc: Andrey Ryabinin > Signed-off-by: Dmitry Safonov Acked-by: Andrey Ry

[Devel] [PATCH rh7 2/2] ms/vmscan: fix increasing nr_isolated incurred by putback unevictable pages

2017-07-12 Thread Andrey Ryabinin
-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Jiri Slaby Signed-off-by: Andrey Ryabinin --- mm/vmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 1b4471ef42e..7b24537448b 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c

[Devel] [PATCH rh7 1/2] ms/Don't trigger congestion wait on dirty-but-not-writeout pages

2017-07-12 Thread Andrey Ryabinin
by: Felipe Contreras Pinpointed-by: Hillf Danton Cc: Michal Hocko Cc: Andrew Morton Cc: Mel Gorman Signed-off-by: Linus Torvalds Signed-off-by: Michal Hocko Signed-off-by: Jiri Slaby Signed-off-by: Andrey Ryabinin --- mm/vmscan.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions

[Devel] [PATCH rh7 1/2] ms/mm: vmscan: reduce size of inactive file list

2017-07-12 Thread Andrey Ryabinin
already been used for anonymous memory. [han...@cmpxchg.org: cgroup-awareness] Signed-off-by: Rik van Riel Signed-off-by: Johannes Weiner Reported-by: Andres Freund Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds https://jira.sw.ru/browse/PSBM-68029 Signed-off-by: Andrey Ryabinin

[Devel] [PATCH rh7 2/2] ms/mm: vmscan: fix IO/refault regression in cache workingset transition

2017-07-12 Thread Andrey Ryabinin
g/r/20170404220052.27593-1-han...@cmpxchg.org Signed-off-by: Johannes Weiner Cc: Rik van Riel Cc: Mel Gorman Cc: Michal Hocko Cc: Vladimir Davydov Cc: [4.7+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds https://jira.sw.ru/browse/PSBM-68029 Signed-off-by:

Re: [Devel] [PATCH 0/3] fix for "KASan: out of bounds access in do_raw_spin_unlock"

2017-07-13 Thread Andrey Ryabinin
t; > Raghavendra K T (1): > x86/spinlocks/paravirt: Fix memory corruption on unlock > Acked-by: Andrey Ryabinin > arch/x86/include/asm/spinlock.h | 114 > ++-- > arch/x86/kernel/kvm.c | 13 +++-- > arch/x86/xen/spinlock

[Devel] [PATCH rh7 1/2] mm/tcache: drop useless replace logic during attach page.

2017-07-19 Thread Andrey Ryabinin
invalidate it. So when we put the page, slot in tcache page_tree should be already empty. Just in case add WARN_ON(err == -EXISTS) to catch such not supposed to happen situations. https://jira.sw.ru/browse/PSBM-64727 Signed-off-by: Andrey Ryabinin --- mm/tcache.c | 44

[Devel] [PATCH rh7 2/2] mm/tcache: use lockless lookups in tcache's page tree.

2017-07-19 Thread Andrey Ryabinin
95 K/sec 19,355 page-faults #0.002 M/sec 255.423624009 seconds time elapsed https://jira.sw.ru/browse/PSBM-64727 Signed-off-by: Andrey Ryabinin --- mm/tcache.c | 206 +--- 1 file changed, 129 insertions(+), 77

Re: [Devel] [PATCH] kernel: call task_work_run() before exit_task_namespaces()

2017-07-19 Thread Andrey Ryabinin
On 07/19/2017 04:14 AM, Andrei Vagin wrote: > From: Andrei Vagin > > task_work_run() has to be called before exit_task_namespaces(), > because fuse_abort_conn() is called from __fput(). If it will not > be executed, we can hang in request_wait_answer(). We have seen this > situation when a proc

[Devel] [PATCH rh7] kobj, uevent: allow to broadcast event to ve0 from any ve

2017-07-20 Thread Andrey Ryabinin
o the ve0 from other ve's to fix this https://jira.sw.ru/browse/PSBM-68710 Signed-off-by: Andrey Ryabinin Cc: Cyrill Gorcunov --- lib/kobject_uevent.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c index 2ef1e157400..f67

Re: [Devel] [PATCH 3/5] netfilter: check per-ve netfilter status on actual operation

2017-07-21 Thread Andrey Ryabinin
On 07/21/2017 10:23 AM, Stanislav Kinsburskiy wrote: > Signed-off-by: Stanislav Kinsburskiy > --- > net/ipv4/ip_sockglue.c |7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c > index bcca7f3..316b477 100644 > --- a/net/ipv4/ip_sock

Re: [Devel] [PATCH v2] netfilter: check per-ve netfilter status on actual operation

2017-07-21 Thread Andrey Ryabinin
On 07/21/2017 03:06 PM, Stanislav Kinsburskiy wrote: > v2: > 1) Return ENOPROTOOPT instead of ENOENT from ip_setsockopt > > Signed-off-by: Stanislav Kinsburskiy > --- > net/ipv4/ip_sockglue.c |7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/

Re: [Devel] [PATCH v2] netfilter: check per-ve netfilter status on actual operation

2017-07-21 Thread Andrey Ryabinin
On 07/21/2017 04:29 PM, Stanislav Kinsburskiy wrote: >>> @@ -1424,6 +1428,9 @@ int ip_getsockopt(struct sock *sk, int level, >>> if (get_user(len, optlen)) >>> return -EFAULT; >>> >>> + if (!ve_ipt_permitted(net, VE_IP_FILTER)) >>> + re

Re: [Devel] [PATCH 0/5] netfilter: rework iptables containerization

2017-07-21 Thread Andrey Ryabinin
ilter/iptable_filter.c |6 -- > net/ipv6/netfilter/ip6_tables.c |6 -- > net/ipv6/netfilter/ip6table_filter.c |6 -- > net/netfilter/x_tables.c | 10 +++--- > 7 files changed, 17 insertions(+), 26 deletions(-) > Reviewed-by: Andrey Ryabini

Re: [Devel] [PATCH] ext4: send abort uevent on ext4 journal abort.

2017-07-25 Thread Andrey Ryabinin
On 07/25/2017 11:28 AM, Dmitry Monakhov wrote: > It can be any workqueue I've pick rsv_conversion_wq because it is > already exists. > Ugh, why not system_wq? ___ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel

[Devel] [PATCH rh7 1/2] mm: fix division by zero in dcache_is_low()

2017-07-25 Thread Andrey Ryabinin
out racy sysctl_vfs_cache_min_ratio updates. https://jira.sw.ru/browse/PSBM-69018 Signed-off-by: Andrey Ryabinin --- fs/super.c | 5 +++-- mm/memcontrol.c | 6 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/fs/super.c b/fs/super.c index 7470621cbf4..9915a9bcd3a 100644

[Devel] [PATCH rh7 2/2] mm/memcg: improve mem_cgroup_dcache_is_low() performance.

2017-07-25 Thread Andrey Ryabinin
ing a single load instead of itearting over all cpus. https://jira.sw.ru/browse/PSBM-68644 Signed-off-by: Andrey Ryabinin --- mm/memcontrol.c | 108 +++- 1 file changed, 84 insertions(+), 24 deletions(-) diff --git a/mm/memcontrol.c

[Devel] [PATCH rh7 v2 1/2] mm: fix division by zero in dcache_is_low()

2017-07-25 Thread Andrey Ryabinin
out racy sysctl_vfs_cache_min_ratio updates. https://jira.sw.ru/browse/PSBM-69018 Signed-off-by: Andrey Ryabinin --- Changes since v1: - Pass vfs_cache_min_ratio into mem_cgroup_dcache_is_low() to get rid of load+branch. fs/super.c | 7 --- include/linux/memc

[Devel] [PATCH rh7] mm/memcg: destroy stat2 percpu counters on deletion of the cgroup.

2017-07-26 Thread Andrey Ryabinin
process_one_work+0x740/0x1910 worker_thread+0x413/0xbf0 kthread+0x1e6/0x250 ret_from_fork+0x58/0x90 Call percpu_counter_destroy() from ___mem_cgroup_free() to fix this. https://jira.sw.ru/browse/PSBM-69145 Fixes: 6c37dde54e88 ("mm/memcg: improve mem_cgroup_dcache_is_low() p

[Devel] [PATCH rh7] mm/memcg: reclaim memory on reaching kmem limit.

2017-07-26 Thread Andrey Ryabinin
ached. If can't reclaim anything allocation will fail as before, but won't trigger the global OOM killer, only per-memcg OOM kill. https://jira.sw.ru/browse/PSBM-68242 Signed-off-by: Andrey Ryabinin --- mm/memcontrol.c | 87 - 1 f

[Devel] [PATCH rh7] mm/memcg: get precise stat2 counters for statistics.

2017-07-28 Thread Andrey Ryabinin
ensitive caller - dcache_is_low(). https://jira.sw.ru/browse/PSBM-69332 Signed-off-by: Andrey Ryabinin --- mm/memcontrol.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 19af6a9d9fc8..5ab5e82c924e 100644 --- a/mm/memcon

[Devel] [PATCH rh7] mm/memcg: fix crashes on migrating THP.

2017-08-14 Thread Andrey Ryabinin
memcg_numa_isolate_pages() calls list_del() inside list_for_each_entry() causing crashes. Use list_for_each_entry_safe() instead as it's safe against removal of list entries. https://jira.sw.ru/browse/PSBM-6 Signed-off-by: Andrey Ryabinin --- mm/memcontrol.c | 4 ++-- 1 file chang

Re: [Devel] [PATCH rh7 4/9] tcache: Make tcache_lru_isolate() keep ni->lock less

2017-08-15 Thread Andrey Ryabinin
On 08/15/2017 02:23 PM, Kirill Tkhai wrote: > Grab pool using RCU technics, and do not use ni->lock. > This refactors the function and will be used in further. > > Signed-off-by: Kirill Tkhai > --- > mm/tcache.c | 36 > 1 file changed, 28 insertions(+), 8 d

Re: [Devel] [PATCH 3/6] proc connector: proc listeners helpers added

2017-08-15 Thread Andrey Ryabinin
On 08/15/2017 03:42 PM, Stanislav Kinsburskiy wrote: > These are precursor helpers, which will hide all the containerization magic. > > Signed-off-by: Stanislav Kinsburskiy > --- > drivers/connector/cn_proc.c | 57 > +-- > 1 file changed, 44 insertions(

Re: [Devel] [PATCH 7/6] proc connector: user containers initial user namespace

2017-08-15 Thread Andrey Ryabinin
On 08/15/2017 03:56 PM, Stanislav Kinsburskiy wrote: > Signed-off-by: Stanislav Kinsburskiy > --- > drivers/connector/cn_proc.c | 17 + > 1 file changed, 13 insertions(+), 4 deletions(-) > > diff --git a/drivers/connector/cn_proc.c b/drivers/connector/cn_proc.c > index c5bd47

Re: [Devel] [PATCH 3/6] proc connector: proc listeners helpers added

2017-08-15 Thread Andrey Ryabinin
On 08/15/2017 04:58 PM, Stanislav Kinsburskiy wrote: > > > 15.08.2017 16:52, Andrey Ryabinin пишет: >> On 08/15/2017 03:42 PM, Stanislav Kinsburskiy wrote: >>> These are precursor helpers, which will hide all the containerization magic. >>> >>

Re: [Devel] [PATCH 3/6] proc connector: proc listeners helpers added

2017-08-15 Thread Andrey Ryabinin
On 08/15/2017 05:20 PM, Stanislav Kinsburskiy wrote: >>> >> >> E.g. we have listener on host, i.e. with all init namespaces. And we also >> have listener in some container. >> Let's say we have task "A" in the container which have global pid 10 and pid >> 3 in container. >> So if "A" forks, the

[Devel] [PATCH rh7] ms/mm/huge_memory.c: respect FOLL_FORCE/FOLL_COW for thp

2017-08-16 Thread Andrey Ryabinin
_pmd() - pmd_dirty() is not available; check the page flags as in can_follow_write_pte() - Adjust context] Signed-off-by: Ben Hutchings [mhocko: This has been forward ported from the 3.2 stable tree. And fixed to return NULL.] Reviewed-by: Michal Hocko Signed-off-by: Jiri Slaby Signed-

[Devel] [PATCH rh7 v2] ms/mm/huge_memory.c: respect FOLL_FORCE/FOLL_COW for thp

2017-08-16 Thread Andrey Ryabinin
_pmd() - pmd_dirty() is not available; check the page flags as in can_follow_write_pte() - Adjust context] Signed-off-by: Ben Hutchings [mhocko: This has been forward ported from the 3.2 stable tree. And fixed to return NULL.] Reviewed-by: Michal Hocko Signed-off-by: Jiri Slaby Signed-

Re: [Devel] [PATCH rh7 v2] ms/mm/huge_memory.c: respect FOLL_FORCE/FOLL_COW for thp

2017-08-16 Thread Andrey Ryabinin
https://jira.sw.ru/browse/PSBM-70151 ___ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel

Re: [Devel] [PATCH rh7 v2 05/10] tcache: Cache rb_first() of reclaim tree in tcache_nodeinfo::rb_first

2017-08-16 Thread Andrey Ryabinin
On 08/16/2017 02:52 PM, Kirill Tkhai wrote: > > @@ -242,6 +250,7 @@ static inline void __tcache_check_events(struct > tcache_nodeinfo *ni, > > rb_erase(&pni->reclaim_node, &ni->reclaim_tree); > __tcache_insert_reclaim_node(ni, pni); > + update_ni_rb_first(ni); Either add u

Re: [Devel] [PATCH rh7 v2 07/10] tcache: Move erase-insert logic out of tcache_check_events()

2017-08-16 Thread Andrey Ryabinin
On 08/16/2017 02:53 PM, Kirill Tkhai wrote: > Make the function return true, when erase-insert (requeue) > should be executed. Move erase-insert out of the function. > > Signed-off-by: Kirill Tkhai > --- > /* > @@ -277,11 +274,12 @@ static void tcache_lru_add(struct tcache_pool *pool, > stru

Re: [Devel] [PATCH rh7 v2 09/10] tcache: Use ni->lock only for inserting and erasing from rbtree.

2017-08-16 Thread Andrey Ryabinin
On 08/16/2017 02:53 PM, Kirill Tkhai wrote: > This patch completes splitting of ni->lock into ni->lock and pni->lock. > Now, global ni->lock is used for inserting in tcache_nodeinfo::reclaim_tree, > which happen just on every 1024 inserting or erasing of pages. > For other LRU operations is used

Re: [Devel] [PATCH rh7 v3 00/10] tcache: Manage LRU lists under per-filesystem lock

2017-08-16 Thread Andrey Ryabinin
e: Make tcache_nodeinfo::nr_pages atomic_long_t > tcache: Use ni->lock only for inserting and erasing from rbtree. > tcache: Move add/sub out of pni->lock > > > mm/tcache.c | 138 > --- > 1 file changed,

Re: [Devel] [PATCH v2 00/27] proc connector: containerize on per-VE basis

2017-08-21 Thread Andrey Ryabinin
drivers/connector/cn_proc.c | 386 > - > drivers/connector/connector.c | 155 > include/linux/connector.h | 20 ++ > include/linux/ve.h|4 > 4 files changed, 323 insertions(+), 242 deletions(-) >

Re: [Devel] [PATCH rh7 0/3] Make count list_lru_one::nr_items lockless

2017-08-22 Thread Andrey Ryabinin
> -- > Signed-off-by: Kirill Tkhai > Acked-by: Andrey Ryabinin ___ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel

[Devel] [PATCH rh7 2/2] mm/memcg: reclaim only kmem if kmem limit reached.

2017-08-25 Thread Andrey Ryabinin
https://jira.sw.ru/browse/PSBM-69226 Signed-off-by: Andrey Ryabinin --- include/linux/memcontrol.h | 10 ++ include/linux/swap.h | 2 +- mm/memcontrol.c| 30 -- mm/vmscan.c| 31 --- 4 files change

[Devel] [PATCH rh7 1/2] mm: use sc->priority for slab shrink targets

2017-08-25 Thread Andrey Ryabinin
ly how many pages each shrinker represents, it's objects are all the information we need. Making this change allows us to place an appropriate amount of pressure on the shrinker pools for their relative size. Signed-off-by: Josef Bacik https://jira.sw.ru/browse/PSBM-69226 Signed-off-by: Andrey Rya

Re: [Devel] [PATCH rh7 2/2] mm/memcg: reclaim only kmem if kmem limit reached.

2017-08-28 Thread Andrey Ryabinin
On 08/28/2017 12:02 PM, Stanislav Kinsburskiy wrote: > > > 25.08.2017 18:38, Andrey Ryabinin пишет: >> If kmem limit on memcg reached, we go into memory reclaim, >> and reclaim everything we can, including page cache and anon. >> Reclaiming page cache or anon won&#x

[Devel] [PATCH rh7] mm/hmm: Restore removed hunk in copy_one_pte()

2017-08-28 Thread Andrey Ryabinin
Rebased "ms/mm: remove rest usage of VM_NONLINEAR and pte_file()" removed huge hunk from copy_one_pte for no reason. Bring it back https://jira.sw.ru/browse/PSBM-70740 Fixes: be8e22c9c444 ("ms/mm: remove rest usage of VM_NONLINEAR and pte_file()") Signed-off-by: Andrey Ryabin

[Devel] [PATCH rh7 2/2] ms/x86, efi, kasan: #undef memset/memcpy/memmove per arch

2017-08-28 Thread Andrey Ryabinin
From: Andrey Ryabinin commit 769a8089c1fd2fe94c13e66fe6e03d7820953ee3 upstream. In not-instrumented code KASAN replaces instrumented memset/memcpy/memmove with not-instrumented analogues __memset/__memcpy/__memove. However, on x86 the EFI stub is not linked with the kernel. It uses not

[Devel] [PATCH rh7 1/2] fixup for - ms/x86_64: kasan: add interceptors for memset/memmove/memcpy functions

2017-08-28 Thread Andrey Ryabinin
This hunk shoud have been in the following patch: 796752003a42b70d1f32eb5771885f59febada0d Author: Andrey Ryabinin Date: Thu Sep 3 19:27:42 2015 +0400 ms/x86_64: kasan: add interceptors for memset/memmove/memcpy functions This fixes: In file included from ./arch/x86/include/asm/string.h

[Devel] [PATCH rh7] fs/dax: remove comment leftover

2017-08-29 Thread Andrey Ryabinin
mem_cgroup_uncharge_page() call in dax_mapping_entry() not needed. Uncharging now happens in __page_cache_release() Should be merged in b3c711a7287f ("ms/mm: memcontrol: rewrite uncharge API") https://jira.sw.ru/browse/PSBM-70742 Signed-off-by: Andrey Ryabinin --- fs/dax.c | 1

[Devel] [PATCH rh7] mm/memcg: add missing kmem charge.

2017-08-29 Thread Andrey Ryabinin
counter_read(&memcg->memory) - page_counter_read(&memcg->kmem) > 0) in mem_cgroup_reparent_charges() won't come true ever. https://jira.sw.ru/browse/PSBM-70556 Fixes: de3a106e28d5 ("mm/memcg: reclaim memory on reaching kmem limit.") Signed-off-by: Andrey Ryabi

[Devel] [PATCH rh7] mm/migrate: add missing memcg charge

2017-08-30 Thread Andrey Ryabinin
Fixes: b3c711a7287f ("ms/mm: memcontrol: rewrite uncharge API") Signed-off-by: Andrey Ryabinin --- mm/migrate.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mm/migrate.c b/mm/migrate.c index 6b7349ca368c..c629762fbfd5 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -2383

[Devel] [PATCH rh7] mm/memcg: drop extra mem_cgroup_inc_failcnt()

2017-08-30 Thread Andrey Ryabinin
We need only one. Shoud be merged into c6f8224e23d8cf ("ms/mm: memcontrol: rewrite charge API") https://jira.sw.ru/browse/PSBM-70741 Signed-off-by: Andrey Ryabinin --- mm/memcontrol.c | 1 - 1 file changed, 1 deletion(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 97

Re: [Devel] [PATCH rh7 2/2] mm/memcg: reclaim only kmem if kmem limit reached.

2017-08-31 Thread Andrey Ryabinin
On 08/31/2017 12:58 PM, Konstantin Khorenko wrote: > Do we want to push it to mainstream as well? > I don't think so. Distributions are slowly moving towards v2 cgroup, where kmem limit simply doesn't exists. And for legacy cgroup v1 lack of reclaim on kmem limit hit wasn't a mistake but a del

Re: [Devel] [PATCH rh7] tswap: Add support for zero-filled pages

2017-08-31 Thread Andrey Ryabinin
On 08/03/2017 12:54 PM, Kirill Tkhai wrote: > static int tswap_frontswap_store(unsigned type, pgoff_t offset, >struct page *page) > { > swp_entry_t entry = swp_entry(type, offset); > + int zero_filled = -1, err = 0; > struct page *cache_page; > -

Re: [Devel] [PATCH rh7] tswap: Add support for zero-filled pages

2017-09-04 Thread Andrey Ryabinin
On 09/04/2017 02:52 PM, Kirill Tkhai wrote: > On 31.08.2017 16:45, Andrey Ryabinin wrote: >> On 08/03/2017 12:54 PM, Kirill Tkhai wrote: >>> static int tswap_frontswap_store(unsigned type, pgoff_t offset, >>> struct page *page) >&

Re: [Devel] [PATCH rh7] tswap: Add support for zero-filled pages

2017-09-04 Thread Andrey Ryabinin
On 09/04/2017 03:03 PM, Andrey Ryabinin wrote: > > > On 09/04/2017 02:52 PM, Kirill Tkhai wrote: >> On 31.08.2017 16:45, Andrey Ryabinin wrote: >>> On 08/03/2017 12:54 PM, Kirill Tkhai wrote: >>>> static int tswap_frontswap

Re: [Devel] [PATCH rh7] tswap: Add support for zero-filled pages

2017-09-04 Thread Andrey Ryabinin
usage in some way. > > Signed-off-by: Kirill Tkhai Acked-by: Andrey Ryabinin ___ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel

[Devel] [PATCH rh7] mm/memcg: sleep if mem_cgroup_force_empty_list() stumped on busy page

2017-09-05 Thread Andrey Ryabinin
_list() is stuck. https://jira.sw.ru/browse/PSBM-70021 Signed-off-by: Andrey Ryabinin --- mm/memcontrol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 940cca31ed5d..b09d5be27444 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -4

[Devel] [PATCH rh7 1/4] fs/ext4: __ext4_es_shrink() rename 'ret' to 'shrunk'

2017-09-12 Thread Andrey Ryabinin
27a308ff74 Author: Vladimir Davydov Date: Fri Jul 17 11:51:54 2015 +0300 ms/fs: convert fs shrinkers to new scan/count API Signed-off-by: Andrey Ryabinin --- fs/ext4/extents_status.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/fs/ext4/extents_status

[Devel] [PATCH rh7 4/4] ext4: change LRU to round-robin in extent status tree shrinker

2017-09-12 Thread Andrey Ryabinin
g Liu Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o https://jira.sw.ru/browse/PSBM-70858 Signed-off-by: Andrey Ryabinin --- fs/ext4/ext4.h | 10 +- fs/ext4/extents.c | 4 +- fs/ext4/extents_status.c| 224 +++

[Devel] [PATCH rh7 2/4] ext4: improve extents status tree trace point

2017-09-12 Thread Andrey Ryabinin
commit fixes a variable name in trace point in order to keep consistency with others. Cc: Andreas Dilger Cc: Jan Kara Reviewed-by: Jan Kara Signed-off-by: Zheng Liu Signed-off-by: Theodore Ts'o https://jira.sw.ru/browse/PSBM-70858 Signed-off-by: Andrey Ryabinin --- fs/ext4/extents_sta

[Devel] [PATCH rh7 3/4] ext4: track extent status tree shrinker delay statictics

2017-09-12 Thread Andrey Ryabinin
Dilger Cc: Jan Kara Reviewed-by: Jan Kara Signed-off-by: Zheng Liu Signed-off-by: Theodore Ts'o https://jira.sw.ru/browse/PSBM-70858 Signed-off-by: Andrey Ryabinin --- fs/ext4/ext4.h | 4 +- fs/ext4/extents_status.c| 186 +--- fs

[Devel] [PATCH rh7 05/39] mm/mempool: avoid KASAN marking mempool poison checks as use-after-free

2017-09-14 Thread Andrey Ryabinin
: Andrey Ryabinin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds https://jira.sw.ru/browse/PSBM-69081 (cherry picked from commit 7640131032db9118a78af715ac77ba2debeeb17c) Signed-off-by: Andrey Ryabinin --- mm/mempool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[Devel] [PATCH rh7 04/39] mm, kasan: SLAB support

2017-09-14 Thread Andrey Ryabinin
entjes Cc: Joonsoo Kim Cc: Andrey Konovalov Cc: Dmitry Vyukov Cc: Andrey Ryabinin Cc: Steven Rostedt Cc: Konstantin Serebryany Cc: Dmitry Chernenkov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds https://jira.sw.ru/browse/PSBM-69081 (cherry picked f

[Devel] [PATCH rh7 12/39] lib/stackdepot: avoid to return 0 handle

2017-09-14 Thread Andrey Ryabinin
iamjoonsoo@lge.com Signed-off-by: Joonsoo Kim Cc: Alexander Potapenko Cc: Andrey Ryabinin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds https://jira.sw.ru/browse/PSBM-69081 (cherry picked from commit 7c31190bcfdbff225950902a9f226e4eb79ca94f) Signed-off-by: Andrey Ryabinin

[Devel] [PATCH rh7 19/39] mm/kasan, slub: don't disable interrupts when object leaves quarantine

2017-09-14 Thread Andrey Ryabinin
SLUB doesn't require disabled interrupts to call ___cache_free(). Link: http://lkml.kernel.org/r/1470062715-14077-3-git-send-email-aryabi...@virtuozzo.com Signed-off-by: Andrey Ryabinin Acked-by: Alexander Potapenko Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Tor

[Devel] [PATCH rh7 09/39] mm, kasan: fix compilation for CONFIG_SLAB

2017-09-14 Thread Andrey Ryabinin
From: Alexander Potapenko Add the missing argument to set_track(). Fixes: cd11016e5f52 ("mm, kasan: stackdepot implementation. Enable stackdepot for SLAB") Signed-off-by: Alexander Potapenko Cc: Andrey Konovalov Cc: Christoph Lameter Cc: Dmitry Vyukov Cc: Andrey Ryabinin

[Devel] [PATCH rh7 11/39] lib/stackdepot.c: allow the stack trace hash to be zero

2017-09-14 Thread Andrey Ryabinin
ander Potapenko Acked-by: Andrey Ryabinin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds https://jira.sw.ru/browse/PSBM-69081 (cherry picked from commit 4e25769c6ad69b983379578f42581d99a2f9) Signed-off-by: Andrey Ryabinin --- lib/stackdepot.c | 4 1 file changed, 4 dele

[Devel] [PATCH rh7 03/39] kasan: various fixes in documentation

2017-09-14 Thread Andrey Ryabinin
From: Andrey Konovalov [a...@linux-foundation.org: coding-style fixes] Signed-off-by: Andrey Konovalov Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Alexander Potapenko Cc: Konstantin Serebryany Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds https://jira.sw.ru/browse/PSBM-69081

[Devel] [PATCH rh7 24/39] x86, kasan, ftrace: Put APIC interrupt handlers into .irqentry.text

2017-09-14 Thread Andrey Ryabinin
/1468575763-144889-1-git-send-email-gli...@google.com [ Minor edits. ] Signed-off-by: Ingo Molnar https://jira.sw.ru/browse/PSBM-69081 (cherry picked from commit 469f00231278da68062a809306df0bac95a27507) Signed-off-by: Andrey Ryabinin --- arch/x86/kernel/entry_64.S | 11 +++ 1 file changed

[Devel] [PATCH rh7 29/39] kasan: update kasan_global for gcc 7

2017-09-14 Thread Andrey Ryabinin
/1479219743-28682-1-git-send-email-dvyu...@google.com Signed-off-by: Dmitry Vyukov Acked-by: Andrey Ryabinin Cc: Alexander Potapenko Cc: [4.0+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds https://jira.sw.ru/browse/PSBM-69081 (cherry picked from commit

[Devel] [PATCH rh7 13/39] mm, kasan: don't call kasan_krealloc() from ksize().

2017-09-14 Thread Andrey Ryabinin
From: Alexander Potapenko Instead of calling kasan_krealloc(), which replaces the memory allocation stack ID (if stack depot is used), just unpoison the whole memory chunk. Signed-off-by: Alexander Potapenko Acked-by: Andrey Ryabinin Cc: Andrey Konovalov Cc: Dmitry Vyukov Cc: Christoph

<    2   3   4   5   6   7   8   9   10   11   >