2015-11-24 08:24:08

by baiyaowei

[permalink] [raw]
Subject: [PATCH] mm/compaction: improve comment

Make comment more accurate.

Signed-off-by: Yaowei Bai <[email protected]>
---
mm/compaction.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/mm/compaction.c b/mm/compaction.c
index de3e1e7..b3cf915 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -1708,7 +1708,9 @@ static void compact_nodes(void)
/* The written value is actually unused, all memory is compacted */
int sysctl_compact_memory;

-/* This is the entry point for compacting all nodes via /proc/sys/vm */
+/* This is the entry point for compacting all nodes via
+ * /proc/sys/vm/compact_memory
+ */
int sysctl_compaction_handler(struct ctl_table *table, int write,
void __user *buffer, size_t *length, loff_t *ppos)
{
--
1.9.1



2015-11-24 15:52:21

by Vlastimil Babka

[permalink] [raw]
Subject: Re: [PATCH] mm/compaction: improve comment

On 11/24/2015 09:23 AM, Yaowei Bai wrote:
> Make comment more accurate.

Make changelog more descriptive? :)

> Signed-off-by: Yaowei Bai <[email protected]>
> ---
> mm/compaction.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/mm/compaction.c b/mm/compaction.c
> index de3e1e7..b3cf915 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -1708,7 +1708,9 @@ static void compact_nodes(void)
> /* The written value is actually unused, all memory is compacted */
> int sysctl_compact_memory;
>
> -/* This is the entry point for compacting all nodes via /proc/sys/vm */
> +/* This is the entry point for compacting all nodes via
> + * /proc/sys/vm/compact_memory
> + */

Strictly speaking, multi-line comments should have a leading empty line,
e.g.:

/*
* This is the entry point ...



> int sysctl_compaction_handler(struct ctl_table *table, int write,
> void __user *buffer, size_t *length, loff_t *ppos)
> {
>

2015-11-25 08:55:22

by baiyaowei

[permalink] [raw]
Subject: Re: [PATCH] mm/compaction: improve comment

On Tue, Nov 24, 2015 at 04:52:17PM +0100, Vlastimil Babka wrote:
> On 11/24/2015 09:23 AM, Yaowei Bai wrote:
> >Make comment more accurate.
>
> Make changelog more descriptive? :)

ok

>
> >Signed-off-by: Yaowei Bai <[email protected]>
> >---
> > mm/compaction.c | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> >diff --git a/mm/compaction.c b/mm/compaction.c
> >index de3e1e7..b3cf915 100644
> >--- a/mm/compaction.c
> >+++ b/mm/compaction.c
> >@@ -1708,7 +1708,9 @@ static void compact_nodes(void)
> > /* The written value is actually unused, all memory is compacted */
> > int sysctl_compact_memory;
> >
> >-/* This is the entry point for compacting all nodes via /proc/sys/vm */
> >+/* This is the entry point for compacting all nodes via
> >+ * /proc/sys/vm/compact_memory
> >+ */
>
> Strictly speaking, multi-line comments should have a leading empty
> line, e.g.:
>
> /*
> * This is the entry point ...

Got it, will send an updated one soon. Thanks.

>
>
>
> > int sysctl_compaction_handler(struct ctl_table *table, int write,
> > void __user *buffer, size_t *length, loff_t *ppos)
> > {
> >
>