Re: [Devel] [PATCH rh7]: ve: Provide interface for current tty inheritance

2018-02-15 Thread Cyrill Gorcunov
On Thu, Feb 15, 2018 at 02:18:27PM -0800, Andrey Vagin wrote: > On Thu, Feb 15, 2018 at 09:54:39PM +0300, Cyrill Gorcunov wrote: > > When fork() is called the current controlling terminal is inherited > > by a child process. But in criu we fork all process first and then > > restore their files,

[Devel] [PATCH RHEL7 COMMIT] ploop: don't forget to dec preq->io_count on a error path

2018-02-15 Thread Konstantin Khorenko
The commit is pushed to "branch-rh7-3.10.0-693.17.1.vz7.43.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-693.17.1.vz7.43.5 --> commit 2286b24cd2ec192ad864fca6a1681944be495fcd Author: Andrei Vagin Date: Thu Feb 15 14:27:13 2018

[Devel] [PATCH 3/4] ploop: allow to set discard granularity and alignment attributes

2018-02-15 Thread Andrei Vagin
[This sender failed our fraud detection checks and may not be who they appear to be. Learn about spoofing at http://aka.ms/LearnAboutSpoofing] Different backing stores can have different values for these parameters. Signed-off-by: Andrei Vagin ---

[Devel] [PATCH RHEL7 COMMIT] ms/target/sbc: Add LBPRZ attribute + control CDB emulation

2018-02-15 Thread Konstantin Khorenko
The commit is pushed to "branch-rh7-3.10.0-693.17.1.vz7.43.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-693.17.1.vz7.43.5 --> commit 7fe6f40999620e6b35b6ddb613e8d28c345d2647 Author: Jamie Pocas Date: Thu Feb 15 15:54:54 2018

[Devel] [PATCH RHEL7 COMMIT] ploop: give aligned regions into fuse fallocate()

2018-02-15 Thread Konstantin Khorenko
The commit is pushed to "branch-rh7-3.10.0-693.17.1.vz7.43.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-693.17.1.vz7.43.5 --> commit 05026ad794b6f7012bb9e4e861a1f74b199750de Author: Andrei Vagin Date: Thu Feb 15 17:34:48 2018

[Devel] [PATCH rh7 v2 3/3] ve/page_alloc, kstat: account allocation latencies per-task

2018-02-15 Thread Andrey Ryabinin
Vstorage wants per-process allocation latencies: - total accumulated latency (total time spent inside the kernel allocator) - total alloc attempts (so that average latency can be calculated) This adds /proc//vz_latency file which outputs the numbers: Type Total_lat

[Devel] [PATCH rh7 v2 2/3] ve/vzstat.h: move some kstat definitions into new header.

2018-02-15 Thread Andrey Ryabinin
Move some definitions into kstat.h, so we could use later in other headers (sched.h) https://jira.sw.ru/browse/PSBM-81395 Signed-off-by: Andrey Ryabinin --- include/linux/kstat.h | 48 include/linux/vzstat.h | 44

[Devel] [PATCH rh7 v2 1/3] ve/kstat/alloc_lat: Don't separate GFP_HIGHMEM and !GFP_HIGHMEM allocation latencies

2018-02-15 Thread Andrey Ryabinin
We use mostly 64-bit systems this days. Since they don't have higmem it's better to not segregate GFP_HIGHMEM and !GFP_HIGHMEM latencies. For backward compatibility we still output alochigh/alochighmp fields in /proc/vz/latency but show only zeroes. https://jira.sw.ru/browse/PSBM-81395

Re: [Devel] [PATCH rh7 v2 3/3] ve/page_alloc, kstat: account allocation latencies per-task

2018-02-15 Thread Andrey Ryabinin
[pborzen...@virtuozzo.com didn't work, retrying via pavel.borzen...@acronis.com] On 02/15/2018 05:48 PM, Andrey Ryabinin wrote: > Vstorage wants per-process allocation latencies: > > - total accumulated latency (total time spent inside the kernel allocator) > - total alloc attempts (so that

Re: [Devel] [PATCH rh7 v2 3/3] ve/page_alloc, kstat: account allocation latencies per-task

2018-02-15 Thread Pavel Borzenkov
> On 15 Feb 2018, at 18:07, Andrey Ryabinin wrote: > > [pborzen...@virtuozzo.com didn't work, retrying via > pavel.borzen...@acronis.com] > > On 02/15/2018 05:48 PM, Andrey Ryabinin wrote: >> Vstorage wants per-process allocation latencies: >> >> - total accumulated

[Devel] [PATCH RHEL7 COMMIT] fuse: add a new async operation to unmap regions

2018-02-15 Thread Konstantin Khorenko
The commit is pushed to "branch-rh7-3.10.0-693.17.1.vz7.43.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-693.17.1.vz7.43.5 --> commit f61077b33db4675d2c21a8571baa123f50e7d816 Author: Andrei Vagin Date: Thu Feb 15 17:34:46 2018

[Devel] [PATCH RHEL7 COMMIT] ploop: allow to set discard granularity and alignment attributes

2018-02-15 Thread Konstantin Khorenko
The commit is pushed to "branch-rh7-3.10.0-693.17.1.vz7.43.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-693.17.1.vz7.43.5 --> commit b1000c102485989296264158dd54572789101bdd Author: Andrei Vagin Date: Thu Feb 15 17:34:47 2018

[Devel] [PATCH RHEL7 COMMIT] ploop: handle discard requests via fallocate

2018-02-15 Thread Konstantin Khorenko
The commit is pushed to "branch-rh7-3.10.0-693.17.1.vz7.43.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-693.17.1.vz7.43.5 --> commit cdbc91de0913009e15ad3af3fb9c5755c710 Author: Andrei Vagin Date: Thu Feb 15 17:34:47 2018

Re: [Devel] [PATCH rh7 v2 3/3] ve/page_alloc, kstat: account allocation latencies per-task

2018-02-15 Thread Andrey Ryabinin
On 02/15/2018 05:48 PM, Andrey Ryabinin wrote: > Vstorage wants per-process allocation latencies: > > - total accumulated latency (total time spent inside the kernel allocator) > - total alloc attempts (so that average latency can be calculated) > > This adds /proc//vz_latency file which

[Devel] [PATCH RHEL7 COMMIT] ve/vzstat.h: move some kstat definitions into new header

2018-02-15 Thread Konstantin Khorenko
The commit is pushed to "branch-rh7-3.10.0-693.17.1.vz7.43.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-693.17.1.vz7.43.6 --> commit c98a0fae0c9a854d1eb90c56a78c84572837764f Author: Andrey Ryabinin Date: Thu Feb 15 19:02:33

[Devel] [PATCH RHEL7 COMMIT] ve/kstat/alloc_lat: Don't separate GFP_HIGHMEM and !GFP_HIGHMEM allocation latencies

2018-02-15 Thread Konstantin Khorenko
The commit is pushed to "branch-rh7-3.10.0-693.17.1.vz7.43.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-693.17.1.vz7.43.6 --> commit 8e0c82cbc58f28ca362bc397121f7cee2ca3a53a Author: Andrey Ryabinin Date: Thu Feb 15 19:02:32

[Devel] [PATCH RHEL7 COMMIT] ve/page_alloc, kstat: account allocation latencies per-task

2018-02-15 Thread Konstantin Khorenko
The commit is pushed to "branch-rh7-3.10.0-693.17.1.vz7.43.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-693.17.1.vz7.43.6 --> commit 6d9a9210395e1f7573f5da6be18a3362f52eea8c Author: Andrey Ryabinin Date: Thu Feb 15 19:02:33

[Devel] [PATCH 7/7] tty: ctty -- Add support for multiple inherited ctty opened

2018-02-15 Thread Cyrill Gorcunov
When kernel does fork a process it gets reference to that named current tty which stands for controlling terminal of a session (if present). Because we unable to propagate such terminals due to restore procedure specifics (we fork processes first, then restore the terminals on demand setting up

[Devel] [PATCH 6/7] tty: Move session lookup leader into find_session_leader

2018-02-15 Thread Cyrill Gorcunov
Signed-off-by: Cyrill Gorcunov --- criu/tty.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/criu/tty.c b/criu/tty.c index 4cc99690f..41d8dcaa2 100644 --- a/criu/tty.c +++ b/criu/tty.c @@ -1292,12 +1292,12 @@ static struct file_desc_ops

[Devel] [PATCH 3/7] files: Provide virt_sid in fd_parms

2018-02-15 Thread Cyrill Gorcunov
Need it to distinguish current console instances. Signed-off-by: Cyrill Gorcunov --- criu/files.c | 1 + criu/include/files.h | 1 + 2 files changed, 2 insertions(+) diff --git a/criu/files.c b/criu/files.c index d5b523f56..2d5d1bc89 100644 --- a/criu/files.c

[Devel] [PATCH 1/7] log: pr_warn_once -- Fix formatting

2018-02-15 Thread Cyrill Gorcunov
Signed-off-by: Cyrill Gorcunov --- criu/include/log.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/criu/include/log.h b/criu/include/log.h index f6b9ec28a..a77c606ca 100644 --- a/criu/include/log.h +++ b/criu/include/log.h @@ -63,7 +63,9 @@

[Devel] [RFC 0/7] criu: Add support for ctty inheritance

2018-02-15 Thread Cyrill Gorcunov
This series requires kernel patch titled [PATCH rh7]: ve: Provide interface for current tty inheritance An easy way to test this is to run container, start screen sessions inside and open a few new sessions where run python script with multiple f=open("/dev/tty", "r+"). Cyrill Gorcunov (7):

[Devel] [PATCH 4/7] tty: Don't check for group inheritance

2018-02-15 Thread Cyrill Gorcunov
The group may vary so we only need to check if sid is reachable, othrewise it might trigger false positive. Signed-off-by: Cyrill Gorcunov --- criu/tty.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/criu/tty.c b/criu/tty.c index

[Devel] [PATCH 5/7] kdat: Add test for ctty inheritance

2018-02-15 Thread Cyrill Gorcunov
Signed-off-by: Cyrill Gorcunov --- criu/include/kerndat.h | 1 + criu/kerndat.c | 17 + 2 files changed, 18 insertions(+) diff --git a/criu/include/kerndat.h b/criu/include/kerndat.h index f3af32df1..a3fe7efd6 100644 --- a/criu/include/kerndat.h

[Devel] [PATCH 2/7] check: Include sys/mount.h before linux/aio_abi.h

2018-02-15 Thread Cyrill Gorcunov
Otherwise MS_RDONLY become undefined on modern distros. Signed-off-by: Cyrill Gorcunov --- criu/cr-check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/criu/cr-check.c b/criu/cr-check.c index 78a0571eb..e4e4a047b 100644 --- a/criu/cr-check.c +++

[Devel] [PATCH rh7]: ve: Provide interface for current tty inheritance

2018-02-15 Thread Cyrill Gorcunov
When fork() is called the current controlling terminal is inherited by a child process. But in criu we fork all process first and then restore their files, thus if terminal is opened in some children its reference get lost. We refuse to checkpoint such configurations at the moment in criu itself.

Re: [Devel] [PATCH rh7]: ve: Provide interface for current tty inheritance

2018-02-15 Thread Andrey Vagin
On Thu, Feb 15, 2018 at 09:54:39PM +0300, Cyrill Gorcunov wrote: > When fork() is called the current controlling terminal is inherited > by a child process. But in criu we fork all process first and then > restore their files, thus if terminal is opened in some children > its reference get lost.