From: Roman Gushchin <klamm@yandex-team.ru>
To: Peter Zijlstra <peterz@infradead.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
"mingo@redhat.com" <mingo@redhat.com>,
"tkhai@yandex.ru" <tkhai@yandex.ru>
Subject: Re: Real-time scheduling policies and hyper-threading
Date: Fri, 25 Apr 2014 20:19:32 +0400 [thread overview]
Message-ID: <7611398442772@webcorp1g.yandex-team.ru> (raw)
In-Reply-To: <20140425151116.GJ11096@twins.programming.kicks-ass.net>
25.04.2014, 19:11, "Peter Zijlstra" <peterz@infradead.org>:
> On Fri, Apr 25, 2014 at 07:02:16PM +0400, Roman Gushchin wrote:
>
>> Hm. What I really want (and try to implement), is
>> "work as if ht is disabled if there are free physical cores, start using ht siblings otherwise".
>
> At which point I have to ask, what about the rest of the topology?
My prototype works as follows: all physical cores on every numa node
are linked into circular list. When I have to select a cpu, I traverse the list
and search for a free core. If there is one, I select them. Otherwise, I jump to the
other node and search there too. It's better to save symmetry here: when I start
with local core number 3, it's reasonable to start with remote core number 3 too.
Also, there is a "node balancing" logic, that causes me to start searching
with remote node, if a big imbalance is detected. It helps to work good under
small load (<8 requests). When there are no free cores, I use the similar logic
to find a free thread.
Now I'm trying to make this algorithm more general and scalable. It will be
great to use the current O(1) cpupri approach on each cpu topology level somehow,
but I have no complete solution yet.
> Also, how is a task to know if its the 16th or 17th and thus should
> expect worse latency?
No way.
>> It's a 32-thread processor with 16 physical cores.
>
> No NUMA? I'm not aware of single node systems with 16 cores.
Of course, 2 physical processors with 8 cores each :)
Sorry.
Thanks,
Roman
next prev parent reply other threads:[~2014-04-25 16:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-24 18:16 Roman Gushchin
2014-04-24 18:58 ` Peter Zijlstra
2014-04-24 20:16 ` Kirill Tkhai
2014-04-24 20:24 ` Peter Zijlstra
2014-04-25 11:12 ` Roman Gushchin
2014-04-25 11:04 ` Roman Gushchin
2014-04-25 13:16 ` Peter Zijlstra
2014-04-25 15:02 ` Roman Gushchin
2014-04-25 15:11 ` Peter Zijlstra
2014-04-25 16:19 ` Roman Gushchin [this message]
2014-04-25 15:16 ` Peter Zijlstra
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=7611398442772@webcorp1g.yandex-team.ru \
--to=klamm@yandex-team.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tkhai@yandex.ru \
/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®