Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ensure context switch always happen #59

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dips48
Copy link

@dips48 dips48 commented Jun 20, 2018

Linux kernel scheduler has changed a lot, which imported
wake_wide to determine whether to use wake_affine in
try_to_wake_up other tasks, since some cpus don't share LLC ,
Under this situation, the behaviour of this case differs a lot,
before using wake_wide, two threads will work on same cpu,
after this, two threads will work on different cpus,
which causes a really big score gap.
For example:
(no using wake_wide) kernel 3.10 score 977
(using wake_wide) kernel 4.9 score 227
which confused me, so i suggest to bind two threads
on different cpus while theads booting up.In this way, we can ensue there always
has context switches.

 wake_wide to determine whether to use wake_affine in
try_to_wake_up other tasks, since some cpus don't share LLC ,
Under this situation, the behaviour of this case differs a lot,
before using wake_wide, two threads will work on same cpu,
after this, two threads will work on different cpus,
which causes a really big score gap.
For example:
	(no using wake_wide) kernel 3.10  score 977
        (using wake_wide) kernel 4.9   score 227
which confused me, so i suggest to bind two threads
on different cpus while theads booting up.In this way, we can ensue there always
has context switches.
@gstrauss
Copy link
Collaborator

(General comment: I question the applicability of some of these overly simplistic benchmarks)

Should we care about hyperthread cores versus primary cores? What about cores on different CPU dies? What about P (performance) cores versus E (efficiency) cores?

Alternatively -- and also changing the test in such a way as to invalidate comparison with prior scores -- might consider sched_yield() on each loop to force context switch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants