[Devel] [PATCH rh7] x86/mm: Use dirty bit for non-linear files ptes

2016-10-03 Thread Andrey Ryabinin
backported patchset "Workaround for Xeon Phi PTE A/D bits erratum" _PAGE_BIT_FILE is not present in upstream but still present in RHEL7 kernel, so they did this: /* Pick a bit unaffected by the "KNL4 erratum": */ #define _PAGE_BIT_FILE _PAGE_BIT_PSE Which conflicts with our

[Devel] [PATCH rh7 v2] x86/mm: Use dirty bit for non-linear files ptes

2016-10-03 Thread Andrey Ryabinin
Backported patchset "Workaround for Xeon Phi PTE A/D bits erratum" caused - kernel BUG at mm/rmap.c:1305! _PAGE_BIT_FILE is not present in upstream but still present in RHEL7 kernel, so they did this: /* Pick a bit unaffected by the "KNL4 erratum": */ #define _PAGE_BIT_FILE _PA

Re: [Devel] [PATCH RH7] ve/kmod/whitelist: allow dummy module autoloading

2016-10-03 Thread Kirill Tkhai
On 30.09.2016 15:41, Pavel Tikhomirov wrote: > After allowing dummy devices in container in bug PSBM-43329 by commit > 6061ed860950 ("ve/net/dummy: enable support in a container") docker-ui > testcase TestDaemonIP was unXFAIed but it still fails to create dummy > because module is not automaticly

[Devel] [PATCH RHEL7 COMMIT] ve/kmod/whitelist: allow dummy module autoloading

2016-10-03 Thread Kirill Tkhai
The commit is pushed to "branch-rh7-3.10.0-327.36.1.vz7.18.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-327.36.1.vz7.18.3 --> commit 30c0b9e216cb37ad6b55f0ca8f2aa1741789715c Author: Pavel Tikhomirov Date: Mon Oct 3 09:00:53 2016 + ve/kmod/w

Re: [Devel] [PATCH rh7 v2] x86/mm: Use dirty bit for non-linear files ptes

2016-10-03 Thread Andrey Ryabinin
On 10/03/2016 11:56 AM, Andrey Ryabinin wrote: > Backported patchset "Workaround for Xeon Phi PTE A/D bits erratum" > caused - kernel BUG at mm/rmap.c:1305! > > _PAGE_BIT_FILE is not present in upstream but still present > in RHEL7 kernel, so they did this: >/* Pick a bit unaffected by the "

Re: [Devel] [PATCH rh7] fs: avoid holding extra reference on original path

2016-10-03 Thread Kirill Tkhai
On 01.10.2016 04:04, Maxim Patlasov wrote: > When vfs_open() opens ordinary file (not overlayfs one), do_dentry_open() will > call path_get(&f->f_path) anyway, so it doesn't make sense to acquire extra > references by another path_get(). > > The above is enough to satisfy LTP syscalls/fcntl/fcntl2

[Devel] [PATCH RHEL7 COMMIT] fs: avoid holding extra reference on original path

2016-10-03 Thread Kirill Tkhai
The commit is pushed to "branch-rh7-3.10.0-327.36.1.vz7.18.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-327.36.1.vz7.18.3 --> commit 247122498983e301268504a0b6af65e469b27de6 Author: Maxim Patlasov Date: Mon Oct 3 09:27:27 2016 + fs: avoid h

[Devel] [PATCH rh7 00/12] replace remap_file_pages() syscall with emulation

2016-10-03 Thread Andrey Ryabinin
Backported patchset "Workaround for Xeon Phi PTE A/D bits erratum" caused - kernel BUG at mm/rmap.c:1305! _PAGE_BIT_FILE is not present in upstream but still present in RHEL7 kernel, so they did this: /* Pick a bit unaffected by the "KNL4 erratum": */ #define _PAGE_BIT_FILE _PAGE_BIT_PS

[Devel] [PATCH rh7 02/12] ms/mm: drop support of non-linear mapping from unmap/zap codepath

2016-10-03 Thread Andrey Ryabinin
From: "Kirill A. Shutemov" We have remap_file_pages(2) emulation in -mm tree for few release cycles and we plan to have it mainline in v3.20. This patchset removes rest of VM_NONLINEAR infrastructure. Patches 1-8 take care about generic code. They are pretty straight-forward and can be applied w

[Devel] [PATCH rh7 11/12] ms/asm-generic: drop unused pte_file* helpers

2016-10-03 Thread Andrey Ryabinin
From: "Kirill A. Shutemov" All users are gone. Signed-off-by: Kirill A. Shutemov Cc: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds https://jira.sw.ru/browse/PSBM-52992 (cherry picked from commit 5064c8e19dc215afae8ffae95570e7f22062d49c) Signed-off-by: Andrey Ryab

[Devel] [PATCH rh7 05/12] ms/proc: drop handling non-linear mappings

2016-10-03 Thread Andrey Ryabinin
From: "Kirill A. Shutemov" We have to handle non-linear mappings for /proc/PID/{smaps,clear_refs} which is unused now. Let's drop it. Signed-off-by: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds https://jira.sw.ru/browse/PSBM-52992 (cherry picked from commit

[Devel] [PATCH rh7 10/12] ms/ipc/shm: handle removed segments gracefully in shm_mmap()

2016-10-03 Thread Andrey Ryabinin
From: "Kirill A. Shutemov" remap_file_pages(2) emulation can reach file which represents removed IPC ID as long as a memory segment is mapped. It breaks expectations of IPC subsystem. Test case (rewritten to be more human readable, originally autogenerated by syzkaller[1]): #define _GN

[Devel] [PATCH rh7 03/12] ms/mm: drop support of non-linear mapping from fault codepath

2016-10-03 Thread Andrey Ryabinin
From: "Kirill A. Shutemov" We don't create non-linear mappings anymore. Let's drop code which handles them on page fault. Signed-off-by: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds https://jira.sw.ru/browse/PSBM-52992 (cherry picked from commit 9b4bdd2ffab

[Devel] [PATCH rh7 09/12] ms/mm: fix regression in remap_file_pages() emulation

2016-10-03 Thread Andrey Ryabinin
From: "Kirill A. Shutemov" Grazvydas Ignotas has reported a regression in remap_file_pages() emulation. Testcase: #define _GNU_SOURCE #include #include #include #include #define SIZE(4096 * 3) int main(int argc, char **argv)

[Devel] [PATCH rh7 12/12] ms/x86: drop _PAGE_FILE and pte_file()-related helpers

2016-10-03 Thread Andrey Ryabinin
From: "Kirill A. Shutemov" We've replaced remap_file_pages(2) implementation with emulation. Nobody creates non-linear mapping anymore. Signed-off-by: Kirill A. Shutemov Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ht

[Devel] [PATCH rh7 08/12] ms/mm: remove rest usage of VM_NONLINEAR and pte_file()

2016-10-03 Thread Andrey Ryabinin
From: "Kirill A. Shutemov" One bit in ->vm_flags is unused now! Signed-off-by: Kirill A. Shutemov Cc: Dan Carpenter Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds https://jira.sw.ru/browse/PSBM-52992 (cherry picked from commit 0661a33611fca12570cba48d9344ce688

[Devel] [PATCH rh7 06/12] ms/rmap: drop support of non-linear mappings

2016-10-03 Thread Andrey Ryabinin
From: "Kirill A. Shutemov" We don't create non-linear mappings anymore. Let's drop code which handles them in rmap. Signed-off-by: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds https://jira.sw.ru/browse/PSBM-52992 (cherry picked from commit 27ba0644ea9dfe6e7

[Devel] [PATCH rh7] ms/coredump: fix unfreezable coredumping task

2016-10-03 Thread Andrey Ryabinin
It could be not possible to freeze coredumping task when it waits for 'core_state->startup' completion, because threads are frozen in get_signal() before they got a chance to complete 'core_state->startup'. Use freezer_do_not_count() to tell freezer to ignore coredumping task while it waits for co

[Devel] [PATCH rh7 01/12] ms/mm: replace remap_file_pages() syscall with emulation

2016-10-03 Thread Andrey Ryabinin
From: "Kirill A. Shutemov" remap_file_pages(2) was invented to be able efficiently map parts of huge file into limited 32-bit virtual address space such as in database workloads. Nonlinear mappings are pain to support and it seems there's no legitimate use-cases nowadays since 64-bit systems are

Re: [Devel] [PATCH rh7] ms/coredump: fix unfreezable coredumping task

2016-10-03 Thread Dmitry Safonov
On 10/03/2016 04:34 PM, Andrey Ryabinin wrote: It could be not possible to freeze coredumping task when it waits for 'core_state->startup' completion, because threads are frozen in get_signal() before they got a chance to complete 'core_state->startup'. Use freezer_do_not_count() to tell freezer

Re: [Devel] [PATCH rh7 00/12] replace remap_file_pages() syscall with emulation

2016-10-03 Thread Cyrill Gorcunov
On Mon, Oct 03, 2016 at 04:20:48PM +0300, Andrey Ryabinin wrote: > Backported patchset "Workaround for Xeon Phi PTE A/D bits erratum" > caused - kernel BUG at mm/rmap.c:1305! > > _PAGE_BIT_FILE is not present in upstream but still present > in RHEL7 kernel, so they did this: >/* Pick a bit una

[Devel] [PATCH 2/2] net: Do not allow conntrack if netlink conntrack is requested

2016-10-03 Thread Kirill Tkhai
The scheme with allowing conntracks suggestes to allow conntrack only after a rule is inserted. But this place is not inserting a rule, it's a manual conntrack creation. Signed-off-by: Kirill Tkhai --- net/netfilter/nf_conntrack_netlink.c |1 - 1 file changed, 1 deletion(-) diff --git a/net

[Devel] [PATCH rh7 04/12] ms/mm: drop vm_ops->remap_pages and generic_file_remap_pages() stub

2016-10-03 Thread Andrey Ryabinin
From: "Kirill A. Shutemov" Nobody uses it anymore. [a...@linux-foundation.org: fix filemap_xip.c] Signed-off-by: Kirill A. Shutemov Cc: Wu Fengguang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds https://jira.sw.ru/browse/PSBM-52992 (cherry picked from commit d83a08db5ba6072caa

[Devel] [PATCH rh7 07/12] ms/mm: replace vma->sharead.linear with vma->shared

2016-10-03 Thread Andrey Ryabinin
From: "Kirill A. Shutemov" After removing vma->shared.nonlinear we have only one member of vma->shared union, which doesn't make much sense. This patch drops the union and move struct vma->shared.linear to vma->shared. Signed-off-by: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-

[Devel] [PATCH RHEL7 COMMIT] ms/mm: replace remap_file_pages() syscall with emulation

2016-10-03 Thread Kirill Tkhai
The commit is pushed to "branch-rh7-3.10.0-327.36.1.vz7.18.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-327.36.1.vz7.18.3 --> commit 11f0d41e66bebde9aa8e07ec998bede873c356e5 Author: Kirill A. Shutemov Date: Mon Oct 3 14:27:25 2016 + ms/mm:

[Devel] [PATCH RHEL7 COMMIT] ms/mm: drop support of non-linear mapping from fault codepath

2016-10-03 Thread Kirill Tkhai
The commit is pushed to "branch-rh7-3.10.0-327.36.1.vz7.18.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-327.36.1.vz7.18.3 --> commit 79aedb341a6dde7836c90503ccf86e074bd3a173 Author: Kirill A. Shutemov Date: Mon Oct 3 14:31:58 2016 + ms/mm:

[Devel] [PATCH RHEL7 COMMIT] ms/mm: drop vm_ops->remap_pages and generic_file_remap_pages() stub

2016-10-03 Thread Kirill Tkhai
The commit is pushed to "branch-rh7-3.10.0-327.36.1.vz7.18.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-327.36.1.vz7.18.3 --> commit 8632e30246819a4738b148a1f0cbcfdbb4a5ca5c Author: Kirill A. Shutemov Date: Mon Oct 3 14:34:14 2016 + ms/mm:

[Devel] [PATCH RHEL7 COMMIT] ms/rmap: drop support of non-linear mappings

2016-10-03 Thread Kirill Tkhai
The commit is pushed to "branch-rh7-3.10.0-327.36.1.vz7.18.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-327.36.1.vz7.18.3 --> commit de430b3b071cfbeb42f515a1e869a86680a0bf86 Author: Kirill A. Shutemov Date: Mon Oct 3 14:40:31 2016 + ms/rmap

[Devel] [PATCH RHEL7 COMMIT] ms/mm: replace vma->sharead.linear with vma->shared

2016-10-03 Thread Kirill Tkhai
The commit is pushed to "branch-rh7-3.10.0-327.36.1.vz7.18.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-327.36.1.vz7.18.3 --> commit 8abfb6a7ad0779b0152d1b24182ddc1c1bd864f9 Author: Kirill A. Shutemov Date: Mon Oct 3 14:42:33 2016 + ms/mm:

[Devel] [PATCH RHEL7 COMMIT] ms/mm: remove rest usage of VM_NONLINEAR and pte_file()

2016-10-03 Thread Kirill Tkhai
The commit is pushed to "branch-rh7-3.10.0-327.36.1.vz7.18.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-327.36.1.vz7.18.3 --> commit ebf137af927b609a0adc531c86b77482c7b411ca Author: Kirill A. Shutemov Date: Mon Oct 3 14:44:33 2016 + ms/mm:

[Devel] [PATCH RHEL7 COMMIT] ms/mm: fix regression in remap_file_pages() emulation

2016-10-03 Thread Kirill Tkhai
The commit is pushed to "branch-rh7-3.10.0-327.36.1.vz7.18.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-327.36.1.vz7.18.3 --> commit 7a8d6f2166c61ecf11c4781db28f6d8352533408 Author: Kirill A. Shutemov Date: Mon Oct 3 14:46:34 2016 + ms/mm:

[Devel] [PATCH RHEL7 COMMIT] ms/ipc/shm: handle removed segments gracefully in shm_mmap()

2016-10-03 Thread Kirill Tkhai
The commit is pushed to "branch-rh7-3.10.0-327.36.1.vz7.18.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-327.36.1.vz7.18.3 --> commit f5e3c5b8af4e24ec25c0e22062bf9a9461fb40f5 Author: Kirill A. Shutemov Date: Mon Oct 3 14:48:35 2016 + ms/ipc/

[Devel] [PATCH RHEL7 COMMIT] ms/asm-generic: drop unused pte_file* helpers

2016-10-03 Thread Kirill Tkhai
The commit is pushed to "branch-rh7-3.10.0-327.36.1.vz7.18.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-327.36.1.vz7.18.3 --> commit fde65e2ebd9d4cb705ed4a9da8afd35c0b062d32 Author: Kirill A. Shutemov Date: Mon Oct 3 14:50:37 2016 + ms/asm-

[Devel] [PATCH RHEL7 COMMIT] ms/x86: drop _PAGE_FILE and pte_file()-related helpers

2016-10-03 Thread Kirill Tkhai
The commit is pushed to "branch-rh7-3.10.0-327.36.1.vz7.18.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-327.36.1.vz7.18.3 --> commit 0c869112807072c3de28bebe00d6f50965ad Author: Kirill A. Shutemov Date: Mon Oct 3 14:52:38 2016 + ms/x86:

[Devel] [PATCH RHEL7 COMMIT] ms/coredump: fix unfreezable coredumping task

2016-10-03 Thread Kirill Tkhai
The commit is pushed to "branch-rh7-3.10.0-327.36.1.vz7.18.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-327.36.1.vz7.18.3 --> commit 6626da2a1f42e5c5abeb258904fd1db494df4629 Author: Andrey Ryabinin Date: Mon Oct 3 14:56:10 2016 + ms/coredum

[Devel] [PATCH 1/2] net: Move net->ct.can_alloc check up to resolve_normal_ct()

2016-10-03 Thread Kirill Tkhai
Move it up on stack to break creation of a CT earlier. This avoids us to search in CT hashes and speeds work up. So, now nf_conntrack_alloc() creates a CT certanly, __nf_conntrack_alloc() doesn't return NULL and it does not need to be external. Signed-off-by: Kirill Tkhai --- include/net/net_na

[Devel] [PATCH RHEL7 COMMIT] ms/mm: drop support of non-linear mapping from unmap/zap codepath

2016-10-03 Thread Kirill Tkhai
The commit is pushed to "branch-rh7-3.10.0-327.36.1.vz7.18.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-327.36.1.vz7.18.3 --> commit 01e8cb7b565a11478afbe95c23b36443ea69de51 Author: Kirill A. Shutemov Date: Mon Oct 3 14:29:47 2016 + ms/mm:

[Devel] [PATCH RHEL7 COMMIT] ms/proc: drop handling non-linear mappings

2016-10-03 Thread Kirill Tkhai
The commit is pushed to "branch-rh7-3.10.0-327.36.1.vz7.18.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-327.36.1.vz7.18.3 --> commit ccb36d3460c10fbb868c65237d3bab4ba461f531 Author: Kirill A. Shutemov Date: Mon Oct 3 14:38:30 2016 + ms/proc

Re: [Devel] [PATCH 2/2] net: Do not allow conntrack if netlink conntrack is requested

2016-10-03 Thread Pavel Tikhomirov
On 10/03/2016 05:16 PM, Kirill Tkhai wrote: The scheme with allowing conntracks suggestes to allow conntrack only after a rule is inserted. But this place is not inserting a rule, it's a manual conntrack creation. Signed-off-by: Kirill Tkhai Reviewed-by: Pavel Tikhomirov --- net/netfilt

Re: [Devel] [PATCH 1/2] net: Move net->ct.can_alloc check up to resolve_normal_ct()

2016-10-03 Thread Pavel Tikhomirov
On 10/03/2016 05:16 PM, Kirill Tkhai wrote: Move it up on stack to break creation of a CT earlier. This avoids us to search in CT hashes and speeds work up. So, now nf_conntrack_alloc() creates a CT certanly, __nf_conntrack_alloc() doesn't return NULL and it does not need to be external. Revi