sched/numa: fix set cpupid on page migration twice
Subsystems (4)
PATCH v2 1/6 sched/numa: fix set cpupid on page migration twice
commit 7851a45cd3 (mm: numa: Copy cpupid on page migration) copy over the cpupid at page migration time, there is unnecessary to set it again in migrate_misplaced_transhuge_page, this patch fix it.
--- mm/migrate.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
mm/migrate.c +0 -2
@@ -1736,8 +1736,6 @@ int migrate_misplaced_transhuge_page(struct mm_struct *mm,if (!new_page) goto out_fail; -page_cpupid_xchg_last (new_page,page_cpupid_last (page)); - isolated =numamigrate_isolate_page (pgdat, page);if (!isolated) {put_page (new_page);
Signature · 7 lines
1.7.7.6 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
PATCH v2 2/6 sched/numa: drop idx field of task_numa_env struct
Drop unused idx field of task_numa_env struct.
--- kernel/sched/fair.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/sched/fair.c +1 -1
@@ -1037,7 +1037,7 @@ struct task_numa_env {struct numa_stats src_stats, dst_stats; -int imbalance_pct, idx; +int imbalance_pct;struct task_struct *best_task;long best_imp;
Signature · 7 lines
1.7.7.6 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
PATCH v2 3/6 sched/numa: drop sysctl_numa_balancing_settle_count sysctl
In reply to Wanpeng Licommit 887c290e (sched/numa: Decide whether to favour task or group weights based on swap candidate relationships) drop the check against sysctl_numa_balancing_settle_count, this patch remove the sysctl.
--- include/linux/sched/sysctl.h | 1 - kernel/sched/fair.c | 9 --------- kernel/sysctl.c | 7 ------- 3 files changed, 0 insertions(+), 17 deletions(-)
include/linux/sched/sysctl.h +0 -1
@@ -48,7 +48,6 @@ extern unsigned int sysctl_numa_balancing_scan_delay;extern unsigned int sysctl_numa_balancing_scan_period_min;extern unsigned int sysctl_numa_balancing_scan_period_max;extern unsigned int sysctl_numa_balancing_scan_size; -extern unsigned int sysctl_numa_balancing_settle_count;#ifdef CONFIG_SCHED_DEBUG extern unsigned int sysctl_sched_migration_cost;
kernel/sched/fair.c +0 -9
@@ -886,15 +886,6 @@ static unsigned int task_scan_max(struct task_struct *p)return max (smin, smax); } -/* -* Once a preferred node is selected the scheduler balancer will prefer moving -* a task to that node for sysctl_numa_balancing_settle_count number of PTE -* scans. This will give the process the chance to accumulate more faults on -* the preferred node but still allow the scheduler to move the task again if -* the nodes CPUs are overloaded. -*/ -unsigned int sysctl_numa_balancing_settle_count__read_mostly =4 ; -static void account_numa_enqueue (struct rq *rq,struct task_struct *p) { rq->nr_numa_running += (p->numa_preferred_nid !=-1 );
kernel/sysctl.c +0 -7
@@ -385,13 +385,6 @@ static struct ctl_table kern_table[] = { .proc_handler = proc_dointvec, }, { - .procname = "numa_balancing_settle_count", - .data = &sysctl_numa_balancing_settle_count, - .maxlen = sizeof(unsigned int), - .mode = 0644, - .proc_handler = proc_dointvec, - }, - { .procname = "numa_balancing_migrate_deferred", .data = &sysctl_numa_balancing_migrate_deferred, .maxlen = sizeof(unsigned int),
Signature · 1 line
1.7.7.6
Re: [PATCH v2 3/6] sched/numa: drop sysctl_numa_balancing_settle_count sysctl
Quoted 5 lines · Wanpeng Li
commit
887c290e(sched/numa: Decide whether to favour task or group weights based on swap candidate relationships) drop the check againstsysctl_numa_balancing_settle_count, this patch remove the sysctl.Signed-off-by Wanpeng Li <[email protected]>
Doh
Signature · 8 lines
Mel Gorman SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [PATCH v2 3/6] sched/numa: drop sysctl_numa_balancing_settle_count sysctl
In reply to Wanpeng LiQuoted 5 lines · Wanpeng Li
commit
887c290e(sched/numa: Decide whether to favour task or group weights based on swap candidate relationships) drop the check againstsysctl_numa_balancing_settle_count, this patch remove the sysctl.Signed-off-by Wanpeng Li <[email protected]>
Signature · 7 lines
All rights reversed -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
PATCH v2 4/6 sched/numa: use wrapper function task_node to get node which task is on
In reply to Wanpeng LiUse wrapper function task_node to get node which task is on.
--- kernel/sched/fair.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
kernel/sched/fair.c +2 -2
@@ -1216,7 +1216,7 @@ static int task_numa_migrate(struct task_struct *p)* elsewhere, so there is no point in (re)trying. */ if (unlikely (!sd)) { - p->numa_preferred_nid =cpu_to_node (task_cpu (p)); + p->numa_preferred_nid =task_node (p);return -EINVAL ; }
@@ -1283,7 +1283,7 @@ static void numa_migrate_preferred(struct task_struct *p) p->numa_migrate_retry = jiffies +HZ ;/* Success if task is already running on preferred CPU */ -if (cpu_to_node (task_cpu (p)) == p->numa_preferred_nid) +if (task_node (p) == p->numa_preferred_nid)return ;/* Otherwise, try migrate to a CPU on the preferred node */
Signature · 7 lines
1.7.7.6 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [PATCH v2 4/6] sched/numa: use wrapper function task_node to get node which task is on
Quoted 3 lines · Wanpeng Li
Use wrapper function
task_nodeto get node which task is on.Signed-off-by Wanpeng Li <[email protected]>
Signature · 2 lines
Mel Gorman SUSE Labs
Re: [PATCH v2 4/6] sched/numa: use wrapper function task_node to get node which task is on
In reply to Wanpeng LiQuoted 3 lines · Wanpeng Li
Use wrapper function
task_nodeto get node which task is on.Signed-off-by Wanpeng Li <[email protected]>
Maybe we have another line to apply the same fix:
./kernel/sched/debug.c:142: SEQ_printf(m, " %d", cpu_to_node(task_cpu(p)));
But anyway,
Thanks,
Naoya Horiguchi
Quoted 35 lines
--- kernel/sched/fair.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)kernel/sched/fair.c +2
-2@@ -1216,7 +1216,7 @@ static int task_numa_migrate(struct task_struct *p)* elsewhere, so there is no point in (re)trying. */ if (unlikely (!sd)) { - p->numa_preferred_nid =cpu_to_node (task_cpu (p)); + p->numa_preferred_nid =task_node (p);return -EINVAL ; }@@ -1283,7 +1283,7 @@ static void numa_migrate_preferred(struct task_struct *p) p->numa_migrate_retry = jiffies +HZ ;/* Success if task is already running on preferred CPU */ -if (cpu_to_node (task_cpu (p)) == p->numa_preferred_nid) +if (task_node (p) == p->numa_preferred_nid)return ;/* Otherwise, try migrate to a CPU on the preferred node */ Signature · 7 lines
1.7.7.6 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [PATCH v2 4/6] sched/numa: use wrapper function task_node to get node which task is on
Quoted 9 lines · Naoya Horiguchi
Quoted 3 lines · Wanpeng Li
Use wrapper function
task_nodeto get node which task is on.Signed-off-by Wanpeng Li <[email protected]>Maybe we have another line to apply the same fix:
./kernel/sched/debug.c:142:SEQ_printf(m, " %d", cpu_to_node(task_cpu(p)));
Ok, I will fold it to next version. Thanks for your review. ;-)
Regards,
Wanpeng Li
Quoted 36 lines
But anyway,
Reviewed-by Naoya Horiguchi <[email protected]>Thanks,
Naoya HoriguchiQuoted 29 lines
--- kernel/sched/fair.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)kernel/sched/fair.c +2
-2@@ -1216,7 +1216,7 @@ static int task_numa_migrate(struct task_struct *p)* elsewhere, so there is no point in (re)trying. */ if (unlikely (!sd)) { - p->numa_preferred_nid =cpu_to_node (task_cpu (p)); + p->numa_preferred_nid =task_node (p);return -EINVAL ; }@@ -1283,7 +1283,7 @@ static void numa_migrate_preferred(struct task_struct *p) p->numa_migrate_retry = jiffies +HZ ;/* Success if task is already running on preferred CPU */ -if (cpu_to_node (task_cpu (p)) == p->numa_preferred_nid) +if (task_node (p) == p->numa_preferred_nid)return ;/* Otherwise, try migrate to a CPU on the preferred node */ Signature · 1 line
1.7.7.6
Quoted 6 lines
Quoted 6 lines
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [PATCH v2 4/6] sched/numa: use wrapper function task_node to get node which task is on
In reply to Wanpeng LiQuoted 3 lines · Wanpeng Li
Use wrapper function
task_nodeto get node which task is on.Signed-off-by Wanpeng Li <[email protected]>
Signature · 7 lines
All rights reversed -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
PATCH v2 5/6 sched/numa: make numamigrate_isolate_page static
In reply to Wanpeng LiMake numamigrate_update_ratelimit static.
--- mm/migrate.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
mm/migrate.c +1 -1
@@ -1616,7 +1616,7 @@ bool numamigrate_update_ratelimit(pg_data_t *pgdat, unsigned long nr_pages)return rate_limited; } -int numamigrate_isolate_page (pg_data_t *pgdat,struct page *page) +static int numamigrate_isolate_page (pg_data_t *pgdat,struct page *page) {int page_lru;
Signature · 7 lines
1.7.7.6 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [PATCH v2 5/6] sched/numa: make numamigrate_isolate_page static
Quoted 1 line · Wanpeng Li
Make
numamigrate_update_ratelimitstatic.
Please change this function name, too :)
Thanks,
Naoya Horiguchi
Quoted 27 lines
Signed-off-by Wanpeng Li <[email protected]>--- mm/migrate.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)mm/migrate.c +1
-1@@ -1616,7 +1616,7 @@ bool numamigrate_update_ratelimit(pg_data_t *pgdat, unsigned long nr_pages)return rate_limited; } -int numamigrate_isolate_page (pg_data_t *pgdat,struct page *page) +static int numamigrate_isolate_page (pg_data_t *pgdat,struct page *page) {int page_lru;Signature · 7 lines
1.7.7.6 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [PATCH v2 5/6] sched/numa: make numamigrate_isolate_page static
Hi Naoya,
Quoted 4 lines · Naoya Horiguchi
Quoted 1 line · Wanpeng Li
Make
numamigrate_update_ratelimitstatic.Please change this function name, too :)
Indeed, the patch description should be "Make numamigrate_isolate_page static".
Regards,
Wanpeng Li
Quoted 27 lines
Reviewed-by Naoya Horiguchi <[email protected]>Thanks,
Naoya HoriguchiQuoted 21 lines
Signed-off-by Wanpeng Li <[email protected]>--- mm/migrate.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)mm/migrate.c +1
-1@@ -1616,7 +1616,7 @@ bool numamigrate_update_ratelimit(pg_data_t *pgdat, unsigned long nr_pages)return rate_limited; } -int numamigrate_isolate_page (pg_data_t *pgdat,struct page *page) +static int numamigrate_isolate_page (pg_data_t *pgdat,struct page *page) {int page_lru;Signature · 1 line
1.7.7.6
Quoted 12 lines
Quoted 6 lines
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
PATCH v2 6/6 sched/numa: make numamigrate_update_ratelimit static
In reply to Wanpeng LiMake numamigrate_update_ratelimit static.
--- mm/migrate.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
mm/migrate.c +2 -1
@@ -1592,7 +1592,8 @@ bool migrate_ratelimited(int node) }/* Returns true if the node is migrate rate-limited after the update */ -bool numamigrate_update_ratelimit (pg_data_t *pgdat,unsigned long nr_pages) +static bool numamigrate_update_ratelimit (pg_data_t *pgdat, +unsigned long nr_pages) {bool rate_limited = false;
Signature · 7 lines
1.7.7.6 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [PATCH v2 6/6] sched/numa: make numamigrate_update_ratelimit static
Quoted 3 lines · Wanpeng Li
Make
numamigrate_update_ratelimitstatic.Signed-off-by Wanpeng Li <[email protected]>
Signature · 7 lines
All rights reversed -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 5 lines · Wanpeng Li
commit
7851a45cd3(mm: numa: Copy cpupid on page migration) copy over the cpupid at page migration time, there is unnecessary to set it again inmigrate_misplaced_transhuge_page, this patch fix it.Signed-off-by Wanpeng Li <[email protected]>
Signature · 8 lines
Mel Gorman SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 9 lines · Mel Gorman
Quoted 5 lines · Wanpeng Li
commit
7851a45cd3(mm: numa: Copy cpupid on page migration) copy over the cpupid at page migration time, there is unnecessary to set it again inmigrate_misplaced_transhuge_page, this patch fix it.Signed-off-by Wanpeng Li <[email protected]>Acked-by Mel Gorman <[email protected]>
Thanks for your review, Mel. ;-)
Regards,
Wanpeng Li
Quoted 9 lines
Signature · 8 lines
Mel Gorman SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 5 lines · Wanpeng Li
commit
7851a45cd3(mm: numa: Copy cpupid on page migration) copy over the cpupid at page migration time, there is unnecessary to set it again inmigrate_misplaced_transhuge_page, this patch fix it.Signed-off-by Wanpeng Li <[email protected]>
Signature · 7 lines
All rights reversed -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 8 lines · Rik van Riel
Quoted 5 lines · Wanpeng Li
commit
7851a45cd3(mm: numa: Copy cpupid on page migration) copy over the cpupid at page migration time, there is unnecessary to set it again inmigrate_misplaced_transhuge_page, this patch fix it.Signed-off-by Wanpeng Li <[email protected]>Reviewed-by Rik van Riel <[email protected]>
Thanks for your review, Rik. ;-)
Regards,
Wanpeng Li
Quoted 3 lines
Signature · 2 lines
-- All rights reversed
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>