[Devel] [PATCH vz7, vz8 1/1] kvm: fix AMD IBRS/IBPB/STIBP/SSBD reporting #PSBM-120787

2020-10-22 Thread Denis V. Lunev
We should report these bits in 8008 EBX on AMD only, i.e. when AMD specific feature bits are enabled. Signed-off-by: Denis V. Lunev CC: Vasily Averin CC: Konstantin Khorenko --- arch/x86/kvm/cpuid.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[Devel] [PATCH vz8 2/4] ia32: add 32-bit vdso virtualization.

2020-10-22 Thread Andrey Ryabinin
Similarly to the 64-bit vdso, make 32-bit vdso mapping per-ve. This will allow per container modification of the linux version xin .note section of vdso and monotonic time. https://jira.sw.ru/browse/PSBM-121668 Signed-off-by: Andrey Ryabinin --- arch/x86/entry/vdso/vma.c| 4 ++--

[Devel] [PATCH vz8 3/4] ve: patch linux_version_code in vdso

2020-10-22 Thread Andrey Ryabinin
On the write to ve.os_release file patch the linux_version_code in the .note section of vdso. https://jira.sw.ru/browse/PSBM-121668 Signed-off-by: Andrey Ryabinin --- arch/x86/entry/vdso/vdso-note.S | 2 ++ arch/x86/entry/vdso/vdso2c.c | 1 + arch/x86/entry/vdso/vdso32/note.S | 2 ++

[Devel] [PATCH vz8 1/4] ve, x86_64: add per-ve vdso mapping.

2020-10-22 Thread Andrey Ryabinin
Make vdso mapping per-ve. This will allow per container modification of the linux version in .note section of vdso and monotonic time. https://jira.sw.ru/browse/PSBM-121668 Signed-off-by: Andrey Ryabinin --- arch/x86/entry/vdso/vma.c| 3 ++- arch/x86/kernel/process_64.c | 2 +-

[Devel] [PATCH vz8 4/4] ve: add per-ve CLOCK_MONOTONIC time via __vclock_getttime()

2020-10-22 Thread Andrey Ryabinin
Make possible to read virtualized container's CLOCK_MONOTONIC time via __vclock_getttime(). Record containers start time in per-ve vdso and substruct it from the host's time on clock read. https://jira.sw.ru/browse/PSBM-121668 Signed-off-by: Andrey Ryabinin ---

Re: [Devel] [PATCH rh8] mm/swap: activate swapped in pages on fault

2020-10-22 Thread Andrey Ryabinin
On 10/19/20 7:32 PM, Konstantin Khorenko wrote: > From: Andrey Ryabinin > > Move swapped in anon pages directly to active list. This should > help us to prevent anon thrashing. Recently swapped in pages > has more chances to stay in memory. > > https://pmc.acronis.com/browse/VSTOR-20859 >

Re: [Devel] [PATCH rh8] ve: Virtualize /proc/swaps to watch from inside CT

2020-10-22 Thread Andrey Ryabinin
On 10/19/20 5:27 PM, Konstantin Khorenko wrote: > From: Kirill Tkhai > > Customize /proc/swaps when showing from !ve_is_super. > Extracted from "Initial patch". > > Signed-off-by: Kirill Tkhai > > (cherry picked from vz7 commit 88c087f1fdb4b0f7934804269df36035ab6b83eb) > Signed-off-by:

[Devel] [PATCH rh8 3/6] ve/sched/loadavg: Calculate avenrun for Containers root cpu cgroups

2020-10-22 Thread Konstantin Khorenko
This patch is a part of vz7 commit (only avenrun part) 34a1dc1e4e3d ("sched: Account task_group::cpustat,taskstats,avenrun") Extracted from "Initial patch". Signed-off-by: Kirill Tkhai +++ ve/sched: Do not use kstat_glb_lock to update kstat_glob::nr_unint_avg

[Devel] [PATCH rh8 5/6] ve/proc/loadavg: Virtualize /proc/loadavg in Containers

2020-10-22 Thread Konstantin Khorenko
The patch is based on following vz7 commits: ecdce58b214c ("sched: Export per task_group statistics_work") a58fb58bff1c ("Use ve init task's css instead of opening cgroup via vfs") 5f2a49a05629 ("sched/ve: Use cfs_rq::h_nr_running to count loadavg") vz8 rebase notes: 1) cpu cgroup vz

[Devel] [PATCH rh8 6/6] vzstat: Add kstat_glob.nr_unint_avg real accounting

2020-10-22 Thread Konstantin Khorenko
This should be a part of commit 127bd48f3385 ("vzstat: Add vzstat module and kstat interfaces") but depends on task_group::avenrun accounting and thus goes separately. Signed-off-by: Konstantin Khorenko --- kernel/sched/loadavg.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-)

[Devel] [PATCH rh8 4/6] ve/sysinfo/loadavg: Virtualize loadavg values in sysinfo()

2020-10-22 Thread Konstantin Khorenko
Fixes: 688c65f8eaf1 ("ve: Virtualize sysinfo") TODO: move appropriate hunk to this commit from the commit above Signed-off-by: Konstantin Khorenko --- kernel/sys.c | 4 1 file changed, 4 deletions(-) diff --git a/kernel/sys.c b/kernel/sys.c index 2646c8041258..e7e07ea8d7ef 100644 ---

[Devel] [PATCH rh8 2/6] sched: Make calc_global_load() return true when it's need to update ve statistic

2020-10-22 Thread Konstantin Khorenko
From: Kirill Tkhai This will be used in next patches to call calc_load_ve() out of jiffies lock. Signed-off-by: Kirill Tkhai = Patchset description: Make calc_load_ve() be executed out of jiffies_lock https://jira.sw.ru/browse/PSBM-84967 Kirill Tkhai (3):

[Devel] [PATCH rh8 1/6] ve/sched: Link VE root cpu cgroups in separate list

2020-10-22 Thread Konstantin Khorenko
From: Kirill Tkhai The idea is to link small number of VE root cpu cgroups to a separate list. This allows to avoid unnecessary calculations of loadavg for VE children cpu cgroups in next patches, and it should positively improve the performance of calc_load_ve().

[Devel] [PATCH rh8 0/6] ve/sched/loadavg: loadavg virtualization

2020-10-22 Thread Konstantin Khorenko
Current patchset is a rework of following vz7 patches: 5655edce75a2 vzstat: Add kstat_glob.nr_unint_avg real accounting 7ca32010adaa ve/proc/loadavg: Virtualize /proc/loadavg in Containers feba442cc064 sched: Call calc_load_ve() out of jiffies_lock 3c158be41cd2 sched: Export