[Devel] [PATCH vz8 1/3] arch/x86: introduce cpuid override

2020-10-30 Thread Andrey Ryabinin
From: Vladimir Davydov Port diff-arch-x86-introduce-cpuid-override Recent Intel CPUs rejected CPUID masking, which is required for flex migration, in favor of CPUID faulting. So we need to support it in kenrel. This patch adds user writable file /proc/vz/cpuid_override, which contains CPUID

[Devel] [PATCH vz8 3/3] x86: Show vcpu cpuflags in cpuinfo

2020-10-30 Thread Andrey Ryabinin
From: Kirill Tkhai Show cpu_i flags as flags of vcpu_i. Extracted from "Initial patch". Merged several reworks. TODO: Maybe replace/rework on_each_cpu() with smp_call_function_single(). Then we won't need split c_start() in previous patch (as the call function will be called right before

[Devel] [PATCH vz8 2/3] x86: make ARCH_[SET|GET]_CPUID friends with /proc/vz/cpuid_override

2020-10-30 Thread Andrey Ryabinin
We are using cpuid faults to emulate cpuid in containers. This conflicts with arch_prctl(ARCH_SET_CPUID, 0) which allows to enable cpuid faulting so that cpuid instruction causes SIGSEGV. Add TIF_CPUID_OVERRIDE thread info flag which is added on all !ve0 tasks. And check this flag along with

[Devel] [PATCH rh8] sched/stat: account forks per task group

2020-10-30 Thread Konstantin Khorenko
From: Vladimir Davydov This is a backport of diff-sched-account-forks-per-task-group: Subject: sched: account forks per task group Date: Fri, 28 Dec 2012 15:09:46 +0400 * [sched] the number of processes should be reported correctly inside a CT in /proc/stat (PSBM-18113) For

[Devel] [PATCH RH7 v2] ve: Reorder ve->ve_ns assignment in ve_grab_context()

2020-10-30 Thread Kirill Tkhai
This function must provide guarantees for readers, that ve_ns != NULL under rcu_read_lock means the rest of context (say, ve->init_task) is table. But now order is wrong, and it does not guarantee that. Fix it. v2: Use local variable for ve_ns, otherwise net_ns write results in NULL pointer

[Devel] [PATCH rh8 3/3] ve/vestat: Introduce /proc/vz/vestat

2020-10-30 Thread Konstantin Khorenko
The patch is based on following vz7 commits: f997bf6c613a ("ve: initial patch") 75fc174adc36 ("sched: Port cpustat related patches") 09e1cb4a7d4d ("ve/proc: restricted proc-entries scope") a58fb58bff1c ("Use ve init task's css instead of opening cgroup via vfs") Signed-off-by: Konstantin

[Devel] [PATCH rh8 2/3] ve/time/stat: idle time virtualization in /proc/loadavg

2020-10-30 Thread Konstantin Khorenko
The patch is based on following vz7 commits: a58fb58bff1c ("Use ve init task's css instead of opening cgroup via vfs") 75fc174adc36 ("sched: Port cpustat related patches") Fixes: a3c4d1d8f383 ("ve/time: Customize VE uptime") TODO: to separate FIXME hunks from a3c4d1d8f383 ("ve/time:

[Devel] [PATCH rh8 1/3] ve/sched/stat: Introduce handler for getting CT cpu statistics

2020-10-30 Thread Konstantin Khorenko
It will be used later in * idle cpu stat virtualization in /proc/loadavg * /proc/vz/vestat output * VZCTL_GET_CPU_STAT ioctl The patch is based on following vz7 commits: ecdce58b214c ("sched: Export per task_group statistics_work") 75fc174adc36 ("sched: Port cpustat related patches")

Re: [Devel] [PATCH rh8 0/8] ve/proc/sched/stat: Virtualize /proc/stat in a Container

2020-10-30 Thread Andrey Ryabinin
On 10/28/20 6:57 PM, Konstantin Khorenko wrote: > This patchset contains of parts of following vz7 commits: > > a58fb58bff1c ("Use ve init task's css instead of opening cgroup via vfs") > ecdce58b214c ("sched: Export per task_group statistics_work") > fc24d1785a28 ("fs/proc: print

Re: [Devel] [PATCH rh8] sched/stat: account ctxsw per task group

2020-10-30 Thread Andrey Ryabinin
On 10/29/20 6:46 PM, Konstantin Khorenko wrote: > From: Vladimir Davydov > > This is a backport of diff-sched-account-ctxsw-per-task-group: > > Subject: sched: account ctxsw per task group > Date: Fri, 28 Dec 2012 15:09:45 +0400 > > * [sched] the number of context switches should be

Re: [Devel] [PATCH rh8 2/3] ve/time/stat: idle time virtualization in /proc/loadavg

2020-10-30 Thread Andrey Ryabinin
On 10/30/20 4:08 PM, Konstantin Khorenko wrote: > The patch is based on following vz7 commits: > a58fb58bff1c ("Use ve init task's css instead of opening cgroup via vfs") > 75fc174adc36 ("sched: Port cpustat related patches") > > Fixes: a3c4d1d8f383 ("ve/time: Customize VE uptime") > >

Re: [Devel] [PATCH rh8 3/3] ve/vestat: Introduce /proc/vz/vestat

2020-10-30 Thread Andrey Ryabinin
On 10/30/20 4:08 PM, Konstantin Khorenko wrote: > The patch is based on following vz7 commits: > > f997bf6c613a ("ve: initial patch") > 75fc174adc36 ("sched: Port cpustat related patches") > 09e1cb4a7d4d ("ve/proc: restricted proc-entries scope") > a58fb58bff1c ("Use ve init task's css

Re: [Devel] [PATCH rh8 1/3] ve/sched/stat: Introduce handler for getting CT cpu statistics

2020-10-30 Thread Andrey Ryabinin
On 10/30/20 4:08 PM, Konstantin Khorenko wrote: > It will be used later in > * idle cpu stat virtualization in /proc/loadavg > * /proc/vz/vestat output > * VZCTL_GET_CPU_STAT ioctl > > The patch is based on following vz7 commits: > ecdce58b214c ("sched: Export per task_group