[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160704000924.GF19044@bbox>
Date: Mon, 4 Jul 2016 09:09:24 +0900
From: Minchan Kim <minchan@...nel.org>
To: Ganesh Mahendran <opensource.ganesh@...il.com>
CC: <linux-kernel@...r.kernel.org>, <linux-mm@...ck.org>,
<akpm@...ux-foundation.org>, <ngupta@...are.org>,
<sergey.senozhatsky.work@...il.com>, <rostedt@...dmis.org>,
<mingo@...hat.com>
Subject: Re: [PATCH 7/8] mm/zsmalloc: add __init,__exit attribute
On Fri, Jul 01, 2016 at 02:41:05PM +0800, Ganesh Mahendran wrote:
> Add __init,__exit attribute for function that is only called in
> module init/exit
to save memory.
>
> Signed-off-by: Ganesh Mahendran <opensource.ganesh@...il.com>
> ---
> mm/zsmalloc.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
> index 6fc631a..1c7460b 100644
> --- a/mm/zsmalloc.c
> +++ b/mm/zsmalloc.c
> @@ -1349,7 +1349,7 @@ static void zs_unregister_cpu_notifier(void)
> cpu_notifier_register_done();
> }
>
> -static void init_zs_size_classes(void)
> +static void __init init_zs_size_classes(void)
> {
> int nr;
>
> @@ -1896,7 +1896,7 @@ static struct file_system_type zsmalloc_fs = {
> .kill_sb = kill_anon_super,
> };
>
> -static int zsmalloc_mount(void)
> +static int __init zsmalloc_mount(void)
> {
> int ret = 0;
>
> @@ -1907,7 +1907,7 @@ static int zsmalloc_mount(void)
> return ret;
> }
>
> -static void zsmalloc_unmount(void)
> +static void __exit zsmalloc_unmount(void)
> {
> kern_unmount(zsmalloc_mnt);
> }
Couldn't we do it for zs_[un]register_cpu_notifier?
Powered by blists - more mailing lists