[Devel] [PATCH RHEL7 COMMIT] ub: zap show_ub_mem in Alt+SysRQ+m
Konstantin Khorenko
khorenko at virtuozzo.com
Mon May 25 03:27:09 PDT 2015
The commit is pushed to "branch-rh7-3.10.0-123.1.2-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-123.1.2.vz7.5.5
------>
commit 7af2449e25e83f47d87ccdfa516fefc96962d38c
Author: Vladimir Davydov <vdavydov at parallels.com>
Date: Mon May 25 14:27:08 2015 +0400
ub: zap show_ub_mem in Alt+SysRQ+m
It is called by the showmem Alt+SysRQ+m. It's not used for quite long time
already. Anyway, all this info is in memcg now, so zap it. If anyone needs it
one day, which I doubt, it will have to be reimplemented in the scope of memcg.
Signed-off-by: Vladimir Davydov <vdavydov at parallels.com>
---
drivers/tty/sysrq.c | 7 -------
include/bc/vmpages.h | 3 ---
kernel/bc/vm_pages.c | 29 -----------------------------
3 files changed, 39 deletions(-)
diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
index 069928f..fe0b813 100644
--- a/drivers/tty/sysrq.c
+++ b/drivers/tty/sysrq.c
@@ -313,13 +313,6 @@ static struct sysrq_key_op sysrq_ftrace_dump_op = {
static void sysrq_handle_showmem(int key)
{
- struct user_beancounter *ub;
-
- rcu_read_lock();
- for_each_beancounter(ub)
- show_ub_mem(ub);
- rcu_read_unlock();
-
show_mem(0);
}
static struct sysrq_key_op sysrq_showmem_op = {
diff --git a/include/bc/vmpages.h b/include/bc/vmpages.h
index 4833ef8..bf63b88 100644
--- a/include/bc/vmpages.h
+++ b/include/bc/vmpages.h
@@ -47,7 +47,4 @@ UB_DECLARE_FUNC(int, ub_lockedshm_charge(struct shmem_inode_info *shi,
UB_DECLARE_VOID_FUNC(ub_lockedshm_uncharge(struct shmem_inode_info *shi,
unsigned long size))
-void __show_ub_mem(struct user_beancounter *ub);
-void show_ub_mem(struct user_beancounter *ub);
-
#endif /* __UB_PAGES_H_ */
diff --git a/kernel/bc/vm_pages.c b/kernel/bc/vm_pages.c
index bc1a1d7..b1eedd2 100644
--- a/kernel/bc/vm_pages.c
+++ b/kernel/bc/vm_pages.c
@@ -270,35 +270,6 @@ static void __exit fini_vmguar_notifier(void)
module_init(init_vmguar_notifier);
module_exit(fini_vmguar_notifier);
-static void __show_one_resource(const char *name, struct ubparm *parm)
-{
- if (parm->limit == UB_MAXVALUE)
- printk("%s: %lu / inf [%lu] ", name,
- parm->held, parm->failcnt);
- else
- printk("%s: %lu / %lu [%lu] ", name,
- parm->held, parm->limit, parm->failcnt);
-}
-
-void __show_ub_mem(struct user_beancounter *ub)
-{
- __show_one_resource("RAM", ub->ub_parms + UB_PHYSPAGES);
- __show_one_resource("SWAP", ub->ub_parms + UB_SWAPPAGES);
- __show_one_resource("KMEM", ub->ub_parms + UB_KMEMSIZE);
- __show_one_resource("DCSZ", ub->ub_parms + UB_DCACHESIZE);
- __show_one_resource("OOMG", ub->ub_parms + UB_OOMGUARPAGES);
-
- printk("Dirty %lu Wback %lu\n",
- ub_stat_get(ub, dirty_pages),
- ub_stat_get(ub, writeback_pages));
-}
-
-void show_ub_mem(struct user_beancounter *ub)
-{
- printk(KERN_INFO "UB-%s-Mem-Info:\n", ub->ub_name);
- __show_ub_mem(ub);
-}
-
#ifdef CONFIG_PROC_FS
static int bc_vmaux_show(struct seq_file *f, void *v)
{
More information about the Devel
mailing list