linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mel Gorman <mel@csn.ul.ie>
To: Nishanth Aravamudan <nacc@us.ibm.com>
Cc: npiggin@suse.de, agl@us.ibm.com, akpm@linux-foudation.org,
	linux-mm@kvack.org
Subject: Re: [RFC PATCH 2/4] mm: create /sys/kernel/mm
Date: Thu, 10 Jul 2008 18:24:23 +0100	[thread overview]
Message-ID: <20080710172423.GF6664@csn.ul.ie> (raw)
In-Reply-To: <20080708180644.GD14908@us.ibm.com>

On (08/07/08 11:06), Nishanth Aravamudan didst pronounce:
> Add a kobject to create /sys/kernel/mm when sysfs is mounted. The
> kobject will exist regardless. This will allow for the hugepage related
> sysfs directories to exist under the mm "subsystem" directory. Add an
> ABI file appropriately.
> 
> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
> 

Acked-by: Mel Gorman <mel@csn.ul.ie>

> diff --git a/Documentation/ABI/testing/sysfs-kernel-mm b/Documentation/ABI/testing/sysfs-kernel-mm
> new file mode 100644
> index 0000000..190d523
> --- /dev/null
> +++ b/Documentation/ABI/testing/sysfs-kernel-mm
> @@ -0,0 +1,6 @@
> +What:		/sys/kernel/mm
> +Date:		July 2008
> +Contact:	Nishanth Aravamudan <nacc@us.ibm.com>, VM maintainers
> +Description:
> +		/sys/kernel/mm/ should contain any and all VM
> +		related information in /sys/kernel/.
> diff --git a/include/linux/kobject.h b/include/linux/kobject.h
> index 60f0d41..5437ac0 100644
> --- a/include/linux/kobject.h
> +++ b/include/linux/kobject.h
> @@ -186,6 +186,8 @@ extern struct kobject *kset_find_obj(struct kset *, const char *);
>  
>  /* The global /sys/kernel/ kobject for people to chain off of */
>  extern struct kobject *kernel_kobj;
> +/* The global /sys/kernel/mm/ kobject for people to chain off of */
> +extern struct kobject *mm_kobj;
>  /* The global /sys/hypervisor/ kobject for people to chain off of */
>  extern struct kobject *hypervisor_kobj;
>  /* The global /sys/power/ kobject for people to chain off of */
> diff --git a/mm/mm_init.c b/mm/mm_init.c
> index eaf0d3b..4775743 100644
> --- a/mm/mm_init.c
> +++ b/mm/mm_init.c
> @@ -7,6 +7,7 @@
>   */
>  #include <linux/kernel.h>
>  #include <linux/init.h>
> +#include <linux/kobject.h>
>  #include "internal.h"
>  
>  #ifdef CONFIG_DEBUG_MEMORY_INIT
> @@ -134,3 +135,17 @@ static __init int set_mminit_loglevel(char *str)
>  }
>  early_param("mminit_loglevel", set_mminit_loglevel);
>  #endif /* CONFIG_DEBUG_MEMORY_INIT */
> +
> +struct kobject *mm_kobj;
> +EXPORT_SYMBOL_GPL(mm_kobj);
> +
> +static int __init mm_sysfs_init(void)
> +{
> +	mm_kobj = kobject_create_and_add("mm", kernel_kobj);
> +	if (!mm_kobj)
> +		return -ENOMEM;
> +
> +	return 0;
> +}
> +
> +__initcall(mm_sysfs_init);
> 
> -- 
> Nishanth Aravamudan <nacc@us.ibm.com>
> IBM Linux Technology Center
> 

-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab

--
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>

  parent reply	other threads:[~2008-07-10 17:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-08 18:03 [RFC PATCH 0/4] -mm-only hugetlb updates Nishanth Aravamudan
2008-07-08 18:05 ` [RFC PATCH 1/4] mm: remove mm_init compilation dependency on CONFIG_DEBUG_MEMORY_INIT Nishanth Aravamudan
2008-07-08 18:06   ` [RFC PATCH 2/4] mm: create /sys/kernel/mm Nishanth Aravamudan
2008-07-08 18:07     ` [RFC PATCH 3/4] hugetlb: hang off of /sys/kernel/mm rather than /sys/kernel Nishanth Aravamudan
2008-07-08 18:08       ` [RFC PATCH 4/4] hugetlb: remove CONFIG_SYSFS dependency Nishanth Aravamudan
2008-07-10 17:39       ` [RFC PATCH 3/4] hugetlb: hang off of /sys/kernel/mm rather than /sys/kernel Mel Gorman
2008-07-10 17:24     ` Mel Gorman [this message]
2008-07-10 16:35   ` [RFC PATCH 1/4] mm: remove mm_init compilation dependency on CONFIG_DEBUG_MEMORY_INIT Mel Gorman
2008-07-08 18:13 ` [RFC PATCH 0/4] -mm-only hugetlb updates Nishanth Aravamudan
2008-07-10 13:11 ` Nick Piggin
2008-07-10 16:50   ` Nishanth Aravamudan

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=20080710172423.GF6664@csn.ul.ie \
    --to=mel@csn.ul.ie \
    --cc=agl@us.ibm.com \
    --cc=akpm@linux-foudation.org \
    --cc=linux-mm@kvack.org \
    --cc=nacc@us.ibm.com \
    --cc=npiggin@suse.de \
    /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