All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm/zsmalloc: add log for module load/unload
@ 2015-01-24 13:48 ` Ganesh Mahendran
  0 siblings, 0 replies; 8+ messages in thread
From: Ganesh Mahendran @ 2015-01-24 13:48 UTC (permalink / raw)
  To: minchan, ngupta; +Cc: akpm, linux-mm, linux-kernel, Ganesh Mahendran

Sometimes, we want to know whether a module is loaded or unloaded
from the log.

This patch adds some log.

Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com>
Cc: Nitin Gupta <ngupta@vflare.org>
Cc: Minchan Kim <minchan@kernel.org>
---
 mm/zsmalloc.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 2d5f5be..16617e9 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -72,6 +72,8 @@
  *
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #ifdef CONFIG_ZSMALLOC_DEBUG
 #define DEBUG
 #endif
@@ -1460,6 +1462,8 @@ static int __init zs_init(void)
 {
 	int ret = zs_register_cpu_notifier();
 
+	pr_info("loaded\n");
+
 	if (ret)
 		goto notifier_fail;
 
@@ -1474,6 +1478,7 @@ static int __init zs_init(void)
 		pr_err("zs stat initialization failed\n");
 		goto stat_fail;
 	}
+
 	return 0;
 
 stat_fail:
@@ -1483,6 +1488,8 @@ stat_fail:
 notifier_fail:
 	zs_unregister_cpu_notifier();
 
+	pr_info("unloaded\n");
+
 	return ret;
 }
 
-- 
1.7.9.5


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

* [PATCH] mm/zsmalloc: add log for module load/unload
@ 2015-01-24 13:48 ` Ganesh Mahendran
  0 siblings, 0 replies; 8+ messages in thread
From: Ganesh Mahendran @ 2015-01-24 13:48 UTC (permalink / raw)
  To: minchan, ngupta; +Cc: akpm, linux-mm, linux-kernel, Ganesh Mahendran

Sometimes, we want to know whether a module is loaded or unloaded
from the log.

This patch adds some log.

Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com>
Cc: Nitin Gupta <ngupta@vflare.org>
Cc: Minchan Kim <minchan@kernel.org>
---
 mm/zsmalloc.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 2d5f5be..16617e9 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -72,6 +72,8 @@
  *
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #ifdef CONFIG_ZSMALLOC_DEBUG
 #define DEBUG
 #endif
@@ -1460,6 +1462,8 @@ static int __init zs_init(void)
 {
 	int ret = zs_register_cpu_notifier();
 
+	pr_info("loaded\n");
+
 	if (ret)
 		goto notifier_fail;
 
@@ -1474,6 +1478,7 @@ static int __init zs_init(void)
 		pr_err("zs stat initialization failed\n");
 		goto stat_fail;
 	}
+
 	return 0;
 
 stat_fail:
@@ -1483,6 +1488,8 @@ stat_fail:
 notifier_fail:
 	zs_unregister_cpu_notifier();
 
+	pr_info("unloaded\n");
+
 	return ret;
 }
 
-- 
1.7.9.5

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

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

* Re: [PATCH] mm/zsmalloc: add log for module load/unload
  2015-01-24 13:48 ` Ganesh Mahendran
@ 2015-01-26 23:19   ` Andrew Morton
  -1 siblings, 0 replies; 8+ messages in thread
From: Andrew Morton @ 2015-01-26 23:19 UTC (permalink / raw)
  To: Ganesh Mahendran; +Cc: minchan, ngupta, linux-mm, linux-kernel

On Sat, 24 Jan 2015 21:48:41 +0800 Ganesh Mahendran <opensource.ganesh@gmail.com> wrote:

> Sometimes, we want to know whether a module is loaded or unloaded
> from the log.

Why?  What's special about zsmalloc?

Please provide much better justification than this.

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

* Re: [PATCH] mm/zsmalloc: add log for module load/unload
@ 2015-01-26 23:19   ` Andrew Morton
  0 siblings, 0 replies; 8+ messages in thread
From: Andrew Morton @ 2015-01-26 23:19 UTC (permalink / raw)
  To: Ganesh Mahendran; +Cc: minchan, ngupta, linux-mm, linux-kernel

On Sat, 24 Jan 2015 21:48:41 +0800 Ganesh Mahendran <opensource.ganesh@gmail.com> wrote:

> Sometimes, we want to know whether a module is loaded or unloaded
> from the log.

Why?  What's special about zsmalloc?

Please provide much better justification than this.

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

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

* Re: [PATCH] mm/zsmalloc: add log for module load/unload
  2015-01-26 23:19   ` Andrew Morton
@ 2015-01-27  2:07     ` Ganesh Mahendran
  -1 siblings, 0 replies; 8+ messages in thread
From: Ganesh Mahendran @ 2015-01-27  2:07 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Minchan Kim, Nitin Gupta, Linux-MM, linux-kernel

Hello, Andrew

2015-01-27 7:19 GMT+08:00 Andrew Morton <akpm@linux-foundation.org>:
> On Sat, 24 Jan 2015 21:48:41 +0800 Ganesh Mahendran <opensource.ganesh@gmail.com> wrote:
>
>> Sometimes, we want to know whether a module is loaded or unloaded
>> from the log.
>
> Why?  What's special about zsmalloc?
>
> Please provide much better justification than this.

When I debug with the zsmalloc module built in kernel.
After system boots up, I did not see:
/sys/kernel/debug/zsmalloc dir.

Although the reason for this is that I made a mistake. I
forgot to add debugfs entry in /etc/fstab.
But I think it is suitable to add information for a module load/unload.
Then we can get this by:
dmesg | grep zsmalloc.

Thanks.

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

* Re: [PATCH] mm/zsmalloc: add log for module load/unload
@ 2015-01-27  2:07     ` Ganesh Mahendran
  0 siblings, 0 replies; 8+ messages in thread
From: Ganesh Mahendran @ 2015-01-27  2:07 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Minchan Kim, Nitin Gupta, Linux-MM, linux-kernel

Hello, Andrew

2015-01-27 7:19 GMT+08:00 Andrew Morton <akpm@linux-foundation.org>:
> On Sat, 24 Jan 2015 21:48:41 +0800 Ganesh Mahendran <opensource.ganesh@gmail.com> wrote:
>
>> Sometimes, we want to know whether a module is loaded or unloaded
>> from the log.
>
> Why?  What's special about zsmalloc?
>
> Please provide much better justification than this.

When I debug with the zsmalloc module built in kernel.
After system boots up, I did not see:
/sys/kernel/debug/zsmalloc dir.

Although the reason for this is that I made a mistake. I
forgot to add debugfs entry in /etc/fstab.
But I think it is suitable to add information for a module load/unload.
Then we can get this by:
dmesg | grep zsmalloc.

Thanks.

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

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

* Re: [PATCH] mm/zsmalloc: add log for module load/unload
  2015-01-27  2:07     ` Ganesh Mahendran
@ 2015-01-27  3:23       ` Minchan Kim
  -1 siblings, 0 replies; 8+ messages in thread
From: Minchan Kim @ 2015-01-27  3:23 UTC (permalink / raw)
  To: Ganesh Mahendran; +Cc: Andrew Morton, Nitin Gupta, Linux-MM, linux-kernel

Hello Ganesh,

On Tue, Jan 27, 2015 at 10:07:53AM +0800, Ganesh Mahendran wrote:
> Hello, Andrew
> 
> 2015-01-27 7:19 GMT+08:00 Andrew Morton <akpm@linux-foundation.org>:
> > On Sat, 24 Jan 2015 21:48:41 +0800 Ganesh Mahendran <opensource.ganesh@gmail.com> wrote:
> >
> >> Sometimes, we want to know whether a module is loaded or unloaded
> >> from the log.
> >
> > Why?  What's special about zsmalloc?
> >
> > Please provide much better justification than this.
> 
> When I debug with the zsmalloc module built in kernel.
> After system boots up, I did not see:
> /sys/kernel/debug/zsmalloc dir.
> 
> Although the reason for this is that I made a mistake. I
> forgot to add debugfs entry in /etc/fstab.
> But I think it is suitable to add information for a module load/unload.
> Then we can get this by:
> dmesg | grep zsmalloc.

I understand your trouble but it's general problem, not zsmalloc specific.
Then, if you really want to fix, you should approach more generic ways.

Thanks.

-- 
Kind regards,
Minchan Kim

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

* Re: [PATCH] mm/zsmalloc: add log for module load/unload
@ 2015-01-27  3:23       ` Minchan Kim
  0 siblings, 0 replies; 8+ messages in thread
From: Minchan Kim @ 2015-01-27  3:23 UTC (permalink / raw)
  To: Ganesh Mahendran; +Cc: Andrew Morton, Nitin Gupta, Linux-MM, linux-kernel

Hello Ganesh,

On Tue, Jan 27, 2015 at 10:07:53AM +0800, Ganesh Mahendran wrote:
> Hello, Andrew
> 
> 2015-01-27 7:19 GMT+08:00 Andrew Morton <akpm@linux-foundation.org>:
> > On Sat, 24 Jan 2015 21:48:41 +0800 Ganesh Mahendran <opensource.ganesh@gmail.com> wrote:
> >
> >> Sometimes, we want to know whether a module is loaded or unloaded
> >> from the log.
> >
> > Why?  What's special about zsmalloc?
> >
> > Please provide much better justification than this.
> 
> When I debug with the zsmalloc module built in kernel.
> After system boots up, I did not see:
> /sys/kernel/debug/zsmalloc dir.
> 
> Although the reason for this is that I made a mistake. I
> forgot to add debugfs entry in /etc/fstab.
> But I think it is suitable to add information for a module load/unload.
> Then we can get this by:
> dmesg | grep zsmalloc.

I understand your trouble but it's general problem, not zsmalloc specific.
Then, if you really want to fix, you should approach more generic ways.

Thanks.

-- 
Kind regards,
Minchan Kim

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

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

end of thread, other threads:[~2015-01-27  3:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-24 13:48 [PATCH] mm/zsmalloc: add log for module load/unload Ganesh Mahendran
2015-01-24 13:48 ` Ganesh Mahendran
2015-01-26 23:19 ` Andrew Morton
2015-01-26 23:19   ` Andrew Morton
2015-01-27  2:07   ` Ganesh Mahendran
2015-01-27  2:07     ` Ganesh Mahendran
2015-01-27  3:23     ` Minchan Kim
2015-01-27  3:23       ` Minchan Kim

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.