[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <FC3AE898-443D-4ACB-BCB4-0F8F2F48CDD0@linux.dev>
Date: Tue, 15 Aug 2023 16:36:31 +0800
From: Muchun Song <muchun.song@...ux.dev>
To: Qi Zheng <zhengqi.arch@...edance.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, david@...morbit.com,
tkhai@...ru, Vlastimil Babka <vbabka@...e.cz>,
Roman Gushchin <roman.gushchin@...ux.dev>, djwong@...nel.org,
Christian Brauner <brauner@...nel.org>,
"Paul E. McKenney" <paulmck@...nel.org>, tytso@....edu,
steven.price@....com, cel@...nel.org,
Sergey Senozhatsky <senozhatsky@...omium.org>,
yujie.liu@...el.com, Greg KH <gregkh@...uxfoundation.org>,
simon.horman@...igine.com, dlemoal@...nel.org,
LKML <linux-kernel@...r.kernel.org>,
Linux-MM <linux-mm@...ck.org>, x86@...nel.org,
kvm@...r.kernel.org, xen-devel@...ts.xenproject.org,
linux-erofs@...ts.ozlabs.org,
linux-f2fs-devel@...ts.sourceforge.net, cluster-devel@...hat.com,
linux-nfs@...r.kernel.org, linux-mtd@...ts.infradead.org,
rcu@...r.kernel.org, netdev@...r.kernel.org,
dri-devel@...ts.freedesktop.org, linux-arm-msm@...r.kernel.org,
dm-devel@...hat.com, linux-raid@...r.kernel.org,
linux-bcache@...r.kernel.org,
virtualization@...ts.linux-foundation.org,
linux-fsdevel@...r.kernel.org, linux-ext4@...r.kernel.org,
linux-xfs@...r.kernel.org, linux-btrfs@...r.kernel.org
Subject: Re: [PATCH v4 01/48] mm: move some shrinker-related function
declarations to mm/internal.h
> On Aug 7, 2023, at 19:08, Qi Zheng <zhengqi.arch@...edance.com> wrote:
>
> The following functions are only used inside the mm subsystem, so it's
> better to move their declarations to the mm/internal.h file.
>
> 1. shrinker_debugfs_add()
> 2. shrinker_debugfs_detach()
> 3. shrinker_debugfs_remove()
>
> Signed-off-by: Qi Zheng <zhengqi.arch@...edance.com>
Reviewed-by: Muchun Song <songmuchun@...edance.com>
One nit bellow.
[...]
> +
> +/*
> + * shrinker related functions
> + */
This is a multi-comment format. "/* shrinker related functions. */" is
the right one-line format of comment.
> +
> +#ifdef CONFIG_SHRINKER_DEBUG
> +extern int shrinker_debugfs_add(struct shrinker *shrinker);
> +extern struct dentry *shrinker_debugfs_detach(struct shrinker *shrinker,
> + int *debugfs_id);
> +extern void shrinker_debugfs_remove(struct dentry *debugfs_entry,
> + int debugfs_id);
> +#else /* CONFIG_SHRINKER_DEBUG */
> +static inline int shrinker_debugfs_add(struct shrinker *shrinker)
> +{
> + return 0;
> +}
> +static inline struct dentry *shrinker_debugfs_detach(struct shrinker *shrinker,
> + int *debugfs_id)
> +{
> + *debugfs_id = -1;
> + return NULL;
> +}
> +static inline void shrinker_debugfs_remove(struct dentry *debugfs_entry,
> + int debugfs_id)
> +{
> +}
> +#endif /* CONFIG_SHRINKER_DEBUG */
> +
> #endif /* __MM_INTERNAL_H */
> --
> 2.30.2
>
Powered by blists - more mailing lists