[PATCH v2 6/7] mm/compaction: improve comment of is_via_compact_memory

Kemeng Shi posted 7 patches 2 years, 3 months ago
There is a newer version of this series
[PATCH v2 6/7] mm/compaction: improve comment of is_via_compact_memory
Posted by Kemeng Shi 2 years, 3 months ago
We do proactive compaction with order == -1 via
1. /proc/sys/vm/compact_memory
2. /sys/devices/system/node/nodex/compact
3. /proc/sys/vm/compaction_proactiveness
Add missed situation in which order == -1.

Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
---
 mm/compaction.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/mm/compaction.c b/mm/compaction.c
index 89a1b627bc89..00b7bba6c72e 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -2061,8 +2061,10 @@ static isolate_migrate_t isolate_migratepages(struct compact_control *cc)
 }
 
 /*
- * order == -1 is expected when compacting via
- * /proc/sys/vm/compact_memory
+ * order == -1 is expected when compacting proactively via
+ * 1. /proc/sys/vm/compact_memory
+ * 2. /sys/devices/system/node/nodex/compact
+ * 3. /proc/sys/vm/compaction_proactiveness
  */
 static inline bool is_via_compact_memory(int order)
 {
-- 
2.30.0
Re: [PATCH v2 6/7] mm/compaction: improve comment of is_via_compact_memory
Posted by Mel Gorman 2 years, 3 months ago
On Sat, Aug 26, 2023 at 11:36:16PM +0800, Kemeng Shi wrote:
> We do proactive compaction with order == -1 via
> 1. /proc/sys/vm/compact_memory
> 2. /sys/devices/system/node/nodex/compact
> 3. /proc/sys/vm/compaction_proactiveness
> Add missed situation in which order == -1.
> 
> Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>

Acked-by: Mel Gorman <mgorman@techsingularity.net>

-- 
Mel Gorman
SUSE Labs
Re: [PATCH v2 6/7] mm/compaction: improve comment of is_via_compact_memory
Posted by Baolin Wang 2 years, 3 months ago

On 8/26/2023 11:36 PM, Kemeng Shi wrote:
> We do proactive compaction with order == -1 via
> 1. /proc/sys/vm/compact_memory
> 2. /sys/devices/system/node/nodex/compact
> 3. /proc/sys/vm/compaction_proactiveness
> Add missed situation in which order == -1.
> 
> Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>

Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>

> ---
>   mm/compaction.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/mm/compaction.c b/mm/compaction.c
> index 89a1b627bc89..00b7bba6c72e 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -2061,8 +2061,10 @@ static isolate_migrate_t isolate_migratepages(struct compact_control *cc)
>   }
>   
>   /*
> - * order == -1 is expected when compacting via
> - * /proc/sys/vm/compact_memory
> + * order == -1 is expected when compacting proactively via
> + * 1. /proc/sys/vm/compact_memory
> + * 2. /sys/devices/system/node/nodex/compact
> + * 3. /proc/sys/vm/compaction_proactiveness
>    */
>   static inline bool is_via_compact_memory(int order)
>   {