[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1397238417.7113.29.camel@joe-AO722>
Date: Fri, 11 Apr 2014 10:46:57 -0700
From: Joe Perches <joe@...ches.com>
To: riel@...hat.com
Cc: linux-kernel@...r.kernel.org, mingo@...nel.org,
peterz@...radead.org, chegu_vinod@...com, mgorman@...e.de
Subject: Re: [PATCH 2/3] sched,numa: retry placement more frequently when
misplaced
On Fri, 2014-04-11 at 13:00 -0400, riel@...hat.com wrote:
> This patch reduces the interval at which migration is retried,
> when the task's numa_scan_period is small.
More style trivia and a question.
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
[]
> @@ -1326,12 +1326,15 @@ static int task_numa_migrate(struct task_struct *p)
> /* Attempt to migrate a task to a CPU on the preferred node. */
> static void numa_migrate_preferred(struct task_struct *p)
> {
> + unsigned long interval = HZ;
Perhaps it'd be better without the unnecessary initialization.
> /* This task has no NUMA fault statistics yet */
> if (unlikely(p->numa_preferred_nid == -1 || !p->numa_faults_memory))
> return;
>
> /* Periodically retry migrating the task to the preferred node */
> - p->numa_migrate_retry = jiffies + HZ;
> + interval = min(interval, msecs_to_jiffies(p->numa_scan_period) / 16);
and use
interval = min_t(unsigned long, HZ,
msecs_to_jiffies(p->numa_scan_period) / 16);
btw; why 16?
Can msecs_to_jiffies(p->numa_scan_period) ever be < 16?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists