From: Peter Zijlstra <peterz@infradead.org>
To: Rik van Riel <riel@redhat.com>
Cc: linux-kernel@vger.kernel.org, chegu_vinod@hp.com,
mingo@kernel.org, umgwanakikbuti@gmail.com
Subject: Re: [PATCH RFC] sched,numa: decay wakee_flips instead of zeroing
Date: Fri, 16 May 2014 15:22:17 +0200 [thread overview]
Message-ID: <20140516132217.GR11096@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20140516001332.67f91af2@annuminas.surriel.com>
[-- Attachment #1: Type: text/plain, Size: 1471 bytes --]
On Fri, May 16, 2014 at 12:13:32AM -0400, Rik van Riel wrote:
> Affine wakeups have the potential to interfere with NUMA placement.
> If a task wakes up too many other tasks, affine wakeups will get
> disabled.
>
> However, regardless of how many other tasks it wakes up, it gets
> re-enabled once a second, potentially interfering with NUMA
> placement of other tasks.
>
> By decaying wakee_wakes in half instead of zeroing it, we can avoid
> that problem for some workloads.
See https://lkml.org/lkml/2013/7/2/110 and further
> Signed-off-by: Rik van Riel <riel@redhat.com>
> ---
> kernel/sched/fair.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 4f01e2f1..0381b11 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -4009,7 +4009,7 @@ static void record_wakee(struct task_struct *p)
> * about the loss.
> */
> if (jiffies > current->wakee_flip_decay_ts + HZ) {
> - current->wakee_flips = 0;
> + current->wakee_flips >>= 1;
> current->wakee_flip_decay_ts = jiffies;
> }
Would it make sense to do something like:
now = jiffies;
while (current->wakee_flips && now > current->wakee_flip_decay_ts + HZ) {
current->wakee_flips >>= 1;
current->wakee_flip_decay_ts += HZ;
}
if (unlikely(now > current->wakee_flip_decay_ts + HZ))
current->wakee_flip_decay_ts = now;
Or is that over engineering things?
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2014-05-16 13:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-16 4:13 [PATCH RFC] sched,numa: decay wakee_flips instead of zeroing Rik van Riel
2014-05-16 6:14 ` [PATCH RFC] sched,numa: move tasks to preferred_node at wakeup time Rik van Riel
2014-05-16 13:38 ` Peter Zijlstra
2014-05-16 13:22 ` Peter Zijlstra [this message]
2014-05-19 13:11 ` [tip:sched/core] sched,numa: Decay wakee_flips instead of zeroing tip-bot for Rik van Riel
2014-05-22 12:29 ` [tip:sched/core] sched/numa: Decay -> " tip-bot for Rik van Riel
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=20140516132217.GR11096@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=chegu_vinod@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=riel@redhat.com \
--cc=umgwanakikbuti@gmail.com \
/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