From: Peter Zijlstra <peterz@infradead.org>
To: Mel Gorman <mgorman@techsingularity.net>
Cc: Mike Galbraith <efault@gmx.de>,
Matt Fleming <matt@codeblueprint.co.uk>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] sched/numa: Delay retrying placement for automatic NUMA balance after wake_affine
Date: Mon, 12 Feb 2018 18:37:43 +0100 [thread overview]
Message-ID: <20180212173743.GB25201@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20180212171131.26139-3-mgorman@techsingularity.net>
On Mon, Feb 12, 2018 at 05:11:31PM +0000, Mel Gorman wrote:
> +static void
> +update_wa_numa_placement(struct task_struct *p, int prev_cpu, int target)
> +{
> + unsigned long interval;
> +
> + if (!static_branch_likely(&sched_numa_balancing))
> + return;
> +
> + /* If balancing has no preference then accept the target */
> + if (p->numa_preferred_nid == -1)
> + return;
> +
> + /* If the wakeup is not affecting locality then accept the target */
> + if (cpus_share_cache(prev_cpu, target))
> + return;
Both the above comments speak of 'accepting' the target, but its a void
function, there's nothing they can do about it. It cannot not accept the
placement.
> +
> + /*
> + * Temporarily prevent NUMA balancing trying to place waker/wakee after
> + * wakee has been moved by wake_affine. This will potentially allow
> + * related tasks to converge and update their data placement. The
> + * 4 * numa_scan_period is to allow the two-pass filter to migrate
> + * hot data to the wakers node.
> + */
> + interval = max(sysctl_numa_balancing_scan_delay,
> + p->numa_scan_period << 2);
> + p->numa_migrate_retry = jiffies + msecs_to_jiffies(interval);
> +
> + interval = max(sysctl_numa_balancing_scan_delay,
> + current->numa_scan_period << 2);
> + current->numa_migrate_retry = jiffies + msecs_to_jiffies(interval);
> +}
Otherwise that makes sense.
next prev parent reply other threads:[~2018-02-12 17:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-12 17:11 [PATCH 0/2] Stop wake_affine fighting with automatic NUMA balancing Mel Gorman
2018-02-12 17:11 ` [PATCH 1/2] sched/fair: Consider SD_NUMA when selecting the most idle group to schedule on Mel Gorman
2018-02-13 10:45 ` Peter Zijlstra
2018-02-13 11:35 ` Mel Gorman
2018-02-13 13:04 ` Peter Zijlstra
2018-02-13 13:29 ` Mel Gorman
2018-02-12 17:11 ` [PATCH 2/2] sched/numa: Delay retrying placement for automatic NUMA balance after wake_affine Mel Gorman
2018-02-12 17:34 ` Peter Zijlstra
2018-02-12 17:52 ` Mel Gorman
2018-02-12 17:37 ` Peter Zijlstra [this message]
2018-02-12 18:11 ` Mel Gorman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180212173743.GB25201@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=efault@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=matt@codeblueprint.co.uk \
--cc=mgorman@techsingularity.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®