* [PATCH] mm, docs: fix comments that mention mem_hotplug_end()
@ 2022-06-19 18:36 Yun-Ze Li
2022-06-20 1:56 ` Souptick Joarder
0 siblings, 1 reply; 3+ messages in thread
From: Yun-Ze Li @ 2022-06-19 18:36 UTC (permalink / raw)
To: akpm; +Cc: linux-mm, linux-kernel, Yun-Ze Li
Comments that mention mem_hotplug_end() are confusing as there is no
function called mem_hotplug_end(). Fix them by replacing all the
occurences of mem_hotplug_end() in the comments with mem_hotplug_done().
Signed-off-by: Yun-Ze Li <p76091292@gs.ncku.edu.tw>
---
include/linux/mmzone.h | 4 ++--
mm/compaction.c | 2 +-
mm/vmscan.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index aab70355d64f..7c7947109986 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -591,7 +591,7 @@ struct zone {
* give them a chance of being in the same cacheline.
*
* Write access to present_pages at runtime should be protected by
- * mem_hotplug_begin/end(). Any reader who can't tolerant drift of
+ * mem_hotplug_begin/done(). Any reader who can't tolerant drift of
* present_pages should get_online_mems() to get a stable value.
*/
atomic_long_t managed_pages;
@@ -870,7 +870,7 @@ typedef struct pglist_data {
unsigned long nr_reclaim_start; /* nr pages written while throttled
* when throttling started. */
struct task_struct *kswapd; /* Protected by
- mem_hotplug_begin/end() */
+ mem_hotplug_begin/done() */
int kswapd_order;
enum zone_type kswapd_highest_zoneidx;
diff --git a/mm/compaction.c b/mm/compaction.c
index 65970107b789..b8c1f60c84b9 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -3009,7 +3009,7 @@ void kcompactd_run(int nid)
/*
* Called by memory hotplug when all memory in a node is offlined. Caller must
- * hold mem_hotplug_begin/end().
+ * hold mem_hotplug_begin/done().
*/
void kcompactd_stop(int nid)
{
diff --git a/mm/vmscan.c b/mm/vmscan.c
index c6918fff06e1..bd6aaf85ee7f 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -4586,7 +4586,7 @@ void kswapd_run(int nid)
/*
* Called by memory hotplug when all memory in a node is offlined. Caller must
- * hold mem_hotplug_begin/end().
+ * hold mem_hotplug_begin/done().
*/
void kswapd_stop(int nid)
{
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mm, docs: fix comments that mention mem_hotplug_end()
2022-06-19 18:36 [PATCH] mm, docs: fix comments that mention mem_hotplug_end() Yun-Ze Li
@ 2022-06-20 1:56 ` Souptick Joarder
2022-06-20 7:15 ` [PATCH v2] " Yun-Ze Li
0 siblings, 1 reply; 3+ messages in thread
From: Souptick Joarder @ 2022-06-20 1:56 UTC (permalink / raw)
To: Yun-Ze Li; +Cc: Andrew Morton, Linux-MM, linux-kernel
On Mon, Jun 20, 2022 at 12:06 AM Yun-Ze Li <p76091292@gs.ncku.edu.tw> wrote:
>
> Comments that mention mem_hotplug_end() are confusing as there is no
> function called mem_hotplug_end(). Fix them by replacing all the
> occurences of mem_hotplug_end() in the comments with mem_hotplug_done().
>
> Signed-off-by: Yun-Ze Li <p76091292@gs.ncku.edu.tw>
> ---
> include/linux/mmzone.h | 4 ++--
> mm/compaction.c | 2 +-
> mm/vmscan.c | 2 +-
> 3 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
> index aab70355d64f..7c7947109986 100644
> --- a/include/linux/mmzone.h
> +++ b/include/linux/mmzone.h
> @@ -591,7 +591,7 @@ struct zone {
> * give them a chance of being in the same cacheline.
> *
> * Write access to present_pages at runtime should be protected by
> - * mem_hotplug_begin/end(). Any reader who can't tolerant drift of
> + * mem_hotplug_begin/done(). Any reader who can't tolerant drift of
> * present_pages should get_online_mems() to get a stable value.
> */
> atomic_long_t managed_pages;
> @@ -870,7 +870,7 @@ typedef struct pglist_data {
> unsigned long nr_reclaim_start; /* nr pages written while throttled
> * when throttling started. */
> struct task_struct *kswapd; /* Protected by
> - mem_hotplug_begin/end() */
> + mem_hotplug_begin/done() */
> int kswapd_order;
> enum zone_type kswapd_highest_zoneidx;
>
> diff --git a/mm/compaction.c b/mm/compaction.c
> index 65970107b789..b8c1f60c84b9 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -3009,7 +3009,7 @@ void kcompactd_run(int nid)
>
> /*
> * Called by memory hotplug when all memory in a node is offlined. Caller must
> - * hold mem_hotplug_begin/end().
> + * hold mem_hotplug_begin/done().
Caller must be hold mem_hotplug_begin/done().
> */
> void kcompactd_stop(int nid)
> {
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index c6918fff06e1..bd6aaf85ee7f 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -4586,7 +4586,7 @@ void kswapd_run(int nid)
>
> /*
> * Called by memory hotplug when all memory in a node is offlined. Caller must
> - * hold mem_hotplug_begin/end().
> + * hold mem_hotplug_begin/done().
Same here.
> */
> void kswapd_stop(int nid)
> {
> --
> 2.25.1
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2] mm, docs: fix comments that mention mem_hotplug_end()
2022-06-20 1:56 ` Souptick Joarder
@ 2022-06-20 7:15 ` Yun-Ze Li
0 siblings, 0 replies; 3+ messages in thread
From: Yun-Ze Li @ 2022-06-20 7:15 UTC (permalink / raw)
To: akpm; +Cc: jrdr.linux, linux-mm, linux-kernel, Yun-Ze Li
Comments that mention mem_hotplug_end() are confusing as there is no
function called mem_hotplug_end(). Fix them by replacing all the
occurences of mem_hotplug_end() in the comments with mem_hotplug_done().
Signed-off-by: Yun-Ze Li <p76091292@gs.ncku.edu.tw>
---
V1 -> V2: Addressed review comments
include/linux/mmzone.h | 4 ++--
mm/compaction.c | 2 +-
mm/vmscan.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index aab70355d64f..7c7947109986 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -591,7 +591,7 @@ struct zone {
* give them a chance of being in the same cacheline.
*
* Write access to present_pages at runtime should be protected by
- * mem_hotplug_begin/end(). Any reader who can't tolerant drift of
+ * mem_hotplug_begin/done(). Any reader who can't tolerant drift of
* present_pages should get_online_mems() to get a stable value.
*/
atomic_long_t managed_pages;
@@ -870,7 +870,7 @@ typedef struct pglist_data {
unsigned long nr_reclaim_start; /* nr pages written while throttled
* when throttling started. */
struct task_struct *kswapd; /* Protected by
- mem_hotplug_begin/end() */
+ mem_hotplug_begin/done() */
int kswapd_order;
enum zone_type kswapd_highest_zoneidx;
diff --git a/mm/compaction.c b/mm/compaction.c
index 65970107b789..d18b07368755 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -3009,7 +3009,7 @@ void kcompactd_run(int nid)
/*
* Called by memory hotplug when all memory in a node is offlined. Caller must
- * hold mem_hotplug_begin/end().
+ * be hold mem_hotplug_begin/done().
*/
void kcompactd_stop(int nid)
{
diff --git a/mm/vmscan.c b/mm/vmscan.c
index c6918fff06e1..e53195a0c019 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -4586,7 +4586,7 @@ void kswapd_run(int nid)
/*
* Called by memory hotplug when all memory in a node is offlined. Caller must
- * hold mem_hotplug_begin/end().
+ * be hold mem_hotplug_begin/done().
*/
void kswapd_stop(int nid)
{
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-06-20 7:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-19 18:36 [PATCH] mm, docs: fix comments that mention mem_hotplug_end() Yun-Ze Li
2022-06-20 1:56 ` Souptick Joarder
2022-06-20 7:15 ` [PATCH v2] " Yun-Ze Li
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.