Create an ops field in /sys/slab/*/ops to contain all the operations defined
on a slab. This will be used to display the additional operations that will
be defined soon.
Reviewed-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
---
mm/slub.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
Index: linux-2.6/mm/slub.c
===================================================================
--- linux-2.6.orig/mm/slub.c 2008-05-05 18:48:42.745160406 -0700
+++ linux-2.6/mm/slub.c 2008-05-05 18:48:49.821409748 -0700
@@ -3832,16 +3832,18 @@ static ssize_t order_show(struct kmem_ca
}
SLAB_ATTR(order);
-static ssize_t ctor_show(struct kmem_cache *s, char *buf)
+static ssize_t ops_show(struct kmem_cache *s, char *buf)
{
- if (s->ctor) {
- int n = sprint_symbol(buf, (unsigned long)s->ctor);
+ int x = 0;
- return n + sprintf(buf + n, "\n");
+ if (s->ctor) {
+ x += sprintf(buf + x, "ctor : ");
+ x += sprint_symbol(buf + x, (unsigned long)s->ctor);
+ x += sprintf(buf + x, "\n");
}
- return 0;
+ return x;
}
-SLAB_ATTR_RO(ctor);
+SLAB_ATTR_RO(ops);
static ssize_t aliases_show(struct kmem_cache *s, char *buf)
{
@@ -4174,7 +4176,7 @@ static struct attribute *slab_attrs[] =
&slabs_attr.attr,
&partial_attr.attr,
&cpu_slabs_attr.attr,
- &ctor_attr.attr,
+ &ops_attr.attr,
&aliases_attr.attr,
&align_attr.attr,
&sanity_checks_attr.attr,
--
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
| Ingo Molnar | Re: [patch] paravirt: VDSO page is essential |
| Johannes Weiner | Re: Versioning file system |
| Matt Mackall | [PATCH 1/13] maps: Uninline some functions in the page walker |
| Greg KH | [patch 00/49] 2.6.25-stable review |
git: | |
| Johannes Schindelin | Re: [PATCH 1/4] Move redo merge code in a function |
| Dmitry Potapov | Re: [RFC] Git User's Survey 2008 |
| Johannes Schindelin | Re: [PATCH] Teach 'git apply' to look at $GIT_DIR/config |
| Shawn O. Pearce | Re: [kernel.org users] [RFD] On deprecating "git-foo" for builtins |
| Brian A. Seklecki | sshd_config(5) PermitRootLogin yes |
| Richard Stallman | Real men don't attack straw men |
| ropers | Re: low-MHz server |
| Diego Fernando Nieto Moreno | Intel DG33 Support |
| Holger Schurig | Re: Linux Wireless Mini-Summit -- Ottawa -- July 22, 2008 |
| Tilman Schmidt | Re: 2.6.25-rc8: FTP transfer errors |
| Eric Dumazet | Re: [rfc][patch 3/3] use SLAB_ALIGN_SMP |
| Lennert Buytenhek | [PATCH 21/39] mv643xx_eth: move port_receive() into its only caller |
| high memory | 14 hours ago | Linux kernel |
| semaphore access speed | 16 hours ago | Applications and Utilities |
| the kernel how to power off the machine | 17 hours ago | Linux kernel |
| Easter Eggs in windows XP | 20 hours ago | Windows |
| Shared swap partition | 21 hours ago | Linux general |
| Root password | 21 hours ago | Linux general |
| Where/when DNOTIFY is used? | 23 hours ago | Linux kernel |
| How to convert Linux Kernel built-in module into a loadable module | 1 day ago | Linux kernel |
| Linux 2.6.24 and I/O schedulers | 1 day ago | Linux kernel |
| USB Driver -- Interrupt Polling -- A Little Help Please | 1 day ago | Linux general |
