[Devel] [PATCH RHEL7 COMMIT] ub: drop swapin/swapout stats
Konstantin Khorenko
khorenko at virtuozzo.com
Thu Sep 3 04:32:16 PDT 2015
If anybody really check swapin/swapout inside Containers,
please let us know the usecase - how do you use these stats.
Thank you.
--
Konstantin
On 09/03/2015 01:34 PM, Konstantin Khorenko wrote:
> The commit is pushed to "branch-rh7-3.10.0-229.7.2-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
> after rh7-3.10.0-229.7.2.vz7.6.6
> ------>
> commit 681603761a5a2c380c8c3c2f2d3c878aa5a267a0
> Author: Vladimir Davydov <vdavydov at parallels.com>
> Date: Thu Sep 3 14:34:22 2015 +0400
>
> ub: drop swapin/swapout stats
>
> Swapin/swapout cannot be accounted by beancounters anymore, because
> memory management moved to memcg. Right now, these stats are not
> provided by memcg, so this patch simply drops them from /proc/vmstat
> inside container and from /proc/bc/CTID/vmaux on the host. If anybody
> requests these counters, they should be reimplemented in the scope of
> memcg and returned back.
>
> https://jira.sw.ru/browse/PSBM-39327
>
> Signed-off-by: Vladimir Davydov <vdavydov at parallels.com>
> ---
> include/bc/beancounter.h | 6 ------
> kernel/bc/vm_pages.c | 31 +------------------------------
> 2 files changed, 1 insertion(+), 36 deletions(-)
>
> diff --git a/include/bc/beancounter.h b/include/bc/beancounter.h
> index 3c32ddf..ec2ba18 100644
> --- a/include/bc/beancounter.h
> +++ b/include/bc/beancounter.h
> @@ -63,12 +63,6 @@ struct ub_percpu_struct {
> unsigned long fuse_requests;
> unsigned long fuse_bytes;
>
> - unsigned long swapin;
> - unsigned long swapout;
> -
> - unsigned long vswapin;
> - unsigned long vswapout;
> -
> #ifdef CONFIG_BC_IO_ACCOUNTING
> unsigned long async_write_complete;
> unsigned long async_write_canceled;
> diff --git a/kernel/bc/vm_pages.c b/kernel/bc/vm_pages.c
> index c52d34f..23e8742 100644
> --- a/kernel/bc/vm_pages.c
> +++ b/kernel/bc/vm_pages.c
> @@ -220,18 +220,7 @@ out:
>
> static int bc_fill_vmstat(struct user_beancounter *ub, unsigned long *stat)
> {
> - int cpu;
> -
> - for_each_possible_cpu(cpu) {
> - struct ub_percpu_struct *pcpu = ub_percpu(ub, cpu);
> -
> - stat[NR_VM_ZONE_STAT_ITEMS + PSWPIN] += pcpu->swapin;
> - stat[NR_VM_ZONE_STAT_ITEMS + PSWPOUT] += pcpu->swapout;
> -
> - stat[NR_VM_ZONE_STAT_ITEMS + PSWPIN] += pcpu->vswapin;
> - stat[NR_VM_ZONE_STAT_ITEMS + PSWPOUT] += pcpu->vswapout;
> - }
> -
> + /* FIXME: show swapin/swapout? */
> return NOTIFY_OK;
> }
>
> @@ -275,32 +264,14 @@ module_exit(fini_vmguar_notifier);
> static int bc_vmaux_show(struct seq_file *f, void *v)
> {
> struct user_beancounter *ub;
> - struct ub_percpu_struct *ub_pcpu;
> - unsigned long swapin, swapout, vswapin, vswapout;
> - int i;
>
> ub = seq_beancounter(f);
>
> ub_sync_memcg(ub);
>
> - swapin = swapout = vswapin = vswapout = 0;
> - for_each_possible_cpu(i) {
> - ub_pcpu = ub_percpu(ub, i);
> - swapin += ub_pcpu->swapin;
> - swapout += ub_pcpu->swapout;
> - vswapin += ub_pcpu->vswapin;
> - vswapout += ub_pcpu->vswapout;
> - }
> -
> seq_printf(f, bc_proc_lu_fmt, "tmpfs_respages",
> ub->ub_tmpfs_respages);
>
> - seq_printf(f, bc_proc_lu_fmt, "swapin", swapin);
> - seq_printf(f, bc_proc_lu_fmt, "swapout", swapout);
> -
> - seq_printf(f, bc_proc_lu_fmt, "vswapin", vswapin);
> - seq_printf(f, bc_proc_lu_fmt, "vswapout", vswapout);
> -
> seq_printf(f, bc_proc_lu_fmt, "ram", ub->ub_parms[UB_PHYSPAGES].held);
>
> return 0;
> _______________________________________________
> Devel mailing list
> Devel at openvz.org
> https://lists.openvz.org/mailman/listinfo/devel
>
More information about the Devel
mailing list