public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] procfs: provide slub's /proc/slabinfo
@ 2008-01-02 18:43 Hugh Dickins
  2008-01-02 18:53 ` Christoph Lameter
  2008-01-02 19:09 ` Pekka Enberg
  0 siblings, 2 replies; 69+ messages in thread
From: Hugh Dickins @ 2008-01-02 18:43 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Pekka Enberg, Ingo Molnar, Andi Kleen, Christoph Lameter,
	Peter Zijlstra, linux-kernel

SLUB's new slabinfo isn't there: it looks as if a last minute change
to Pekka's patch left it dependent on CONFIG_SLAB at the procfs end:
allow for CONFIG_SLUB too.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
---
To minimize ifdeffery, this leaves it with S_IWUSR though unwritable:
I'm assuming that's acceptable.

 fs/proc/proc_misc.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

--- 2.6.24-rc6-git/fs/proc/proc_misc.c	2007-10-20 08:04:13.000000000 +0100
+++ linux/fs/proc/proc_misc.c	2008-01-02 17:55:57.000000000 +0000
@@ -410,15 +410,18 @@ static const struct file_operations proc
 };
 #endif
 
-#ifdef CONFIG_SLAB
+#if defined(CONFIG_SLAB) || defined(CONFIG_SLUB)
 static int slabinfo_open(struct inode *inode, struct file *file)
 {
 	return seq_open(file, &slabinfo_op);
 }
+
 static const struct file_operations proc_slabinfo_operations = {
 	.open		= slabinfo_open,
 	.read		= seq_read,
+#ifdef CONFIG_SLAB
 	.write		= slabinfo_write,
+#endif
 	.llseek		= seq_lseek,
 	.release	= seq_release,
 };
@@ -728,7 +731,7 @@ void __init proc_misc_init(void)
 #endif
 	create_seq_entry("stat", 0, &proc_stat_operations);
 	create_seq_entry("interrupts", 0, &proc_interrupts_operations);
-#ifdef CONFIG_SLAB
+#if defined(CONFIG_SLAB) || defined(CONFIG_SLUB)
 	create_seq_entry("slabinfo",S_IWUSR|S_IRUGO,&proc_slabinfo_operations);
 #ifdef CONFIG_DEBUG_SLAB_LEAK
 	create_seq_entry("slab_allocators", 0 ,&proc_slabstats_operations);

^ permalink raw reply	[flat|nested] 69+ messages in thread

end of thread, other threads:[~2008-07-31 17:55 UTC | newest]

Thread overview: 69+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-02 18:43 [PATCH] procfs: provide slub's /proc/slabinfo Hugh Dickins
2008-01-02 18:53 ` Christoph Lameter
2008-01-02 19:09 ` Pekka Enberg
2008-01-02 19:35   ` Linus Torvalds
2008-01-02 19:45     ` Linus Torvalds
2008-01-02 19:49     ` Pekka Enberg
2008-01-02 22:50     ` Matt Mackall
2008-01-03  8:52       ` Ingo Molnar
2008-01-03 16:46         ` Matt Mackall
2008-01-04  2:21           ` Christoph Lameter
2008-01-04  2:45             ` Andi Kleen
2008-01-04  4:34               ` Matt Mackall
2008-01-04  9:17               ` Peter Zijlstra
2008-01-04 20:37                 ` Christoph Lameter
2008-01-04  4:11             ` Matt Mackall
2008-01-04 20:34               ` Christoph Lameter
2008-01-04 20:55                 ` Matt Mackall
2008-01-04 21:36                   ` Christoph Lameter
2008-01-04 22:30                     ` Matt Mackall
2008-01-05 20:16                       ` Christoph Lameter
2008-01-05 16:21               ` Pekka J Enberg
2008-01-05 17:14                 ` Andi Kleen
2008-01-05 20:05                 ` Christoph Lameter
2008-01-07 20:12                   ` Pekka J Enberg
2008-01-06 17:51                 ` Matt Mackall
2008-01-07 18:06                   ` Pekka J Enberg
2008-01-07 19:03                     ` Matt Mackall
2008-01-07 19:53                       ` Pekka J Enberg
2008-01-07 20:44                       ` Pekka J Enberg
2008-01-10 10:04                       ` Pekka J Enberg
2008-01-09 19:15                     ` [RFC PATCH] greatly reduce SLOB external fragmentation Matt Mackall
2008-01-09 22:43                       ` Pekka J Enberg
2008-01-09 22:59                         ` Matt Mackall
2008-01-10 10:02                           ` Pekka J Enberg
2008-01-10 10:54                             ` Pekka J Enberg
2008-01-10 15:44                               ` Matt Mackall
2008-01-10 16:13                               ` Linus Torvalds
2008-01-10 17:49                                 ` Matt Mackall
2008-01-10 18:28                                   ` Linus Torvalds
2008-01-10 18:42                                     ` Matt Mackall
2008-01-10 19:24                                       ` Christoph Lameter
2008-01-10 19:44                                         ` Matt Mackall
2008-01-10 19:51                                           ` Christoph Lameter
2008-01-10 19:41                                       ` Linus Torvalds
2008-01-10 19:46                                         ` Christoph Lameter
2008-01-10 19:53                                         ` Andi Kleen
2008-01-10 19:52                                           ` Christoph Lameter
2008-01-10 19:16                                   ` Christoph Lameter
2008-01-10 19:23                                     ` Matt Mackall
2008-01-10 19:31                                       ` Christoph Lameter
2008-01-10 21:25                                   ` Jörn Engel
2008-01-10 18:13                                 ` Andi Kleen
2008-07-30 21:51                                 ` Pekka J Enberg
2008-07-30 22:00                                   ` Linus Torvalds
2008-07-30 22:22                                     ` Pekka Enberg
2008-07-30 22:35                                       ` Linus Torvalds
2008-07-31  0:42                                         ` malc
2008-07-31  1:03                                         ` Matt Mackall
2008-07-31  1:09                                     ` Matt Mackall
2008-07-31 14:11                                       ` Andi Kleen
2008-07-31 15:25                                         ` Christoph Lameter
2008-07-31 16:03                                           ` Andi Kleen
2008-07-31 16:05                                             ` Christoph Lameter
2008-07-31 14:26                                       ` Christoph Lameter
2008-07-31 15:38                                         ` Matt Mackall
2008-07-31 15:42                                           ` Christoph Lameter
2008-01-10  2:46                         ` Matt Mackall
2008-01-10 10:03                       ` Pekka J Enberg
2008-01-03 20:31         ` [PATCH] procfs: provide slub's /proc/slabinfo Christoph Lameter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox