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

20425-Yield-longer-in-ProcessorScheduleridleProcess #444

Conversation

zecke
Copy link
Contributor

@zecke zecke commented Nov 7, 2017

The work of the idle process is to run when no other smalltalk process is
runnable. And the process will use a primitive to yield execution for a given
amount of microseconds. The VM will either pick the closest delay to expire
or the timeout provided and yield execution. It will resume earlier in case of
I/O.

Pick 50ms as this is the time WorldState will update in server mode. In the
future we can increase it to minutes.

@zecke
Copy link
Contributor Author

zecke commented Nov 7, 2017

@estebanlm another try..

@tesonep tesonep changed the title Yield the CPU longer 20425-Yield-longer-in-ProcessorScheduleridleProcess Nov 24, 2017
The work of the idle process is to run when no other smalltalk process is
runnable. And the process will use a primitive to yield execution for a given
amount of microseconds. The VM will either pick the closest delay to expire
or the timeout provided and yield execution. It will resume earlier in case of
I/O.

Pick 50ms as this is the time WorldState will update in server mode. In the
future we can increase it to minutes.
@zecke zecke force-pushed the 20425-Yield-longer-in-ProcessorScheduleridleProcess branch from 5651cd1 to 0b0d12d Compare January 13, 2018 15:42
@zecke
Copy link
Contributor Author

zecke commented Jan 13, 2018

@estebanlm I rebased it again. Any luck in trying to get it integrated?

@estebanlm
Copy link
Member

I have to say that I tested it myself and it seems to work fine (and eats a lot less processor), so I like this change.
Now, I would be happier if that value could be configurable, not a hardcoded value (and I'm ok with putting it on 5000)

@estebanlm
Copy link
Member

it maybe has a reason why is hardcoded?

@zecke
Copy link
Contributor Author

zecke commented Jan 16, 2018

The evolution of this routine should be to vanish/call a "yield" primitive. The first goal is to just raise it a lot higher (as a safeguard, your VM would come back...). The Windows VM seems to have a race condition across wakeups but nobody cared on the ML. :(

@estebanlm
Copy link
Member

failing tests not related, I will accept this PR monday (to have time to rollback if something goes bad)

@estebanlm
Copy link
Member

let's hope it does not explodes :)

@estebanlm estebanlm merged commit 813aed5 into pharo-project:development Feb 1, 2018
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.

None yet

2 participants