From: "Yang Shi" <yang.s@alibaba-inc.com>
To: cl@linux.com, penberg@kernel.org, rientjes@google.com,
iamjoonsoo.kim@lge.com, akpm@linux-foundation.org,
mhocko@kernel.org
Cc: Yang Shi <yang.s@alibaba-inc.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/3] mm: slabinfo: dump CONFIG_SLABINFO
Date: Wed, 04 Oct 2017 02:06:16 +0800 [thread overview]
Message-ID: <1507053977-116952-3-git-send-email-yang.s@alibaba-inc.com> (raw)
In-Reply-To: <1507053977-116952-1-git-send-email-yang.s@alibaba-inc.com>
According to the discussion with Christoph [1], it sounds it is pointless
to keep CONFIG_SLABINFO around.
This patch just remove CONFIG_SLABINFO config option, but /proc/slabinfo
is still available.
[1] https://marc.info/?l=linux-kernel&m=150695909709711&w=2
Signed-off-by: Yang Shi <yang.s@alibaba-inc.com>
---
init/Kconfig | 6 ------
mm/memcontrol.c | 2 --
mm/slab.c | 2 --
mm/slab_common.c | 3 ---
mm/slub.c | 2 --
5 files changed, 15 deletions(-)
diff --git a/init/Kconfig b/init/Kconfig
index 78cb246..5d3c80a 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1657,12 +1657,6 @@ config HAVE_GENERIC_DMA_COHERENT
bool
default n
-config SLABINFO
- bool
- depends on PROC_FS
- depends on SLAB || SLUB_DEBUG
- default y
-
config RT_MUTEXES
bool
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 15af3da..0a8ed72 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -4039,7 +4039,6 @@ static ssize_t memcg_write_event_control(struct kernfs_open_file *of,
.write = mem_cgroup_reset,
.read_u64 = mem_cgroup_read_u64,
},
-#ifdef CONFIG_SLABINFO
{
.name = "kmem.slabinfo",
.seq_start = memcg_slab_start,
@@ -4047,7 +4046,6 @@ static ssize_t memcg_write_event_control(struct kernfs_open_file *of,
.seq_stop = memcg_slab_stop,
.seq_show = memcg_slab_show,
},
-#endif
{
.name = "kmem.tcp.limit_in_bytes",
.private = MEMFILE_PRIVATE(_TCP, RES_LIMIT),
diff --git a/mm/slab.c b/mm/slab.c
index 04dec48..5743a51 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -4096,7 +4096,6 @@ static void cache_reap(struct work_struct *w)
schedule_delayed_work(work, round_jiffies_relative(REAPTIMEOUT_AC));
}
-#ifdef CONFIG_SLABINFO
void get_slabinfo(struct kmem_cache *cachep, struct slabinfo *sinfo)
{
unsigned long active_objs, num_objs, active_slabs;
@@ -4404,7 +4403,6 @@ static int __init slab_proc_init(void)
return 0;
}
module_init(slab_proc_init);
-#endif
#ifdef CONFIG_HARDENED_USERCOPY
/*
diff --git a/mm/slab_common.c b/mm/slab_common.c
index 904a83b..5520a22 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -1175,8 +1175,6 @@ void cache_random_seq_destroy(struct kmem_cache *cachep)
}
#endif /* CONFIG_SLAB_FREELIST_RANDOM */
-#ifdef CONFIG_SLABINFO
-
#ifdef CONFIG_SLAB
#define SLABINFO_RIGHTS (S_IWUSR | S_IRUSR)
#else
@@ -1346,7 +1344,6 @@ static int __init slab_proc_init(void)
return 0;
}
module_init(slab_proc_init);
-#endif /* CONFIG_SLABINFO */
static __always_inline void *__do_krealloc(const void *p, size_t new_size,
gfp_t flags)
diff --git a/mm/slub.c b/mm/slub.c
index 163352c..74a8776 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -5851,7 +5851,6 @@ static int __init slab_sysfs_init(void)
/*
* The /proc/slabinfo ABI
*/
-#ifdef CONFIG_SLABINFO
void get_slabinfo(struct kmem_cache *s, struct slabinfo *sinfo)
{
unsigned long nr_slabs = 0;
@@ -5883,4 +5882,3 @@ ssize_t slabinfo_write(struct file *file, const char __user *buffer,
{
return -EIO;
}
-#endif /* CONFIG_SLABINFO */
--
1.8.3.1
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2017-10-03 18:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-03 18:06 [PATCH 0/3 v8] oom: capture unreclaimable slab info in oom message Yang Shi
2017-10-03 18:06 ` [PATCH 1/3] tools: slabinfo: add "-U" option to show unreclaimable slabs only Yang Shi
2017-10-03 18:06 ` Yang Shi [this message]
2017-10-03 18:06 ` [PATCH 3/3] mm: oom: show unreclaimable slab info when unreclaimable slabs > user memory Yang Shi
2017-10-04 14:27 ` Michal Hocko
2017-10-04 17:37 ` Yang Shi
2017-10-04 18:08 ` Yang Shi
2017-10-05 7:57 ` Michal Hocko
2017-10-03 18:10 ` [PATCH 0/3 v8] oom: capture unreclaimable slab info in oom message Yang Shi
2017-10-04 21:29 [PATCH 0/3 v10] " Yang Shi
2017-10-04 21:29 ` [PATCH 2/3] mm: slabinfo: dump CONFIG_SLABINFO Yang Shi
2017-10-07 11:45 ` kbuild test robot
2017-10-07 12:06 ` kbuild test robot
2017-10-10 17:25 [PATCH 0/3 v11] oom: capture unreclaimable slab info in oom message Yang Shi
2017-10-10 17:25 ` [PATCH 2/3] mm: slabinfo: dump CONFIG_SLABINFO Yang Shi
2017-10-17 0:17 ` David Rientjes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1507053977-116952-3-git-send-email-yang.s@alibaba-inc.com \
--to=yang.s@alibaba-inc.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox