Re: Unobfuscate thread stealing algorithm

2019-01-27 Thread Mark Kettenis
> Date: Sun, 27 Jan 2019 12:56:34 -0200 > From: Martin Pieuchot > > On 27/01/19(Sun) 01:02, Mark Kettenis wrote: > > > Date: Sat, 26 Jan 2019 14:46:41 -0200 > > > From: Martin Pieuchot > > > > > > On MP machines, when a CPU executes mi_switch() and doesn't have any > > > thread on its runqueue

Re: Unobfuscate thread stealing algorithm

2019-01-27 Thread Martin Pieuchot
On 27/01/19(Sun) 01:02, Mark Kettenis wrote: > > Date: Sat, 26 Jan 2019 14:46:41 -0200 > > From: Martin Pieuchot > > > > On MP machines, when a CPU executes mi_switch() and doesn't have any > > thread on its runqueue it will try to steal one from another CPU's > > runqueue. If it fails to steal

Re: Unobfuscate thread stealing algorithm

2019-01-26 Thread Mark Kettenis
> Date: Sat, 26 Jan 2019 14:46:41 -0200 > From: Martin Pieuchot > > On MP machines, when a CPU executes mi_switch() and doesn't have any > thread on its runqueue it will try to steal one from another CPU's > runqueue. If it fails to steal a thread from another runqueue it > will pick its own Idl

Unobfuscate thread stealing algorithm

2019-01-26 Thread Martin Pieuchot
On MP machines, when a CPU executes mi_switch() and doesn't have any thread on its runqueue it will try to steal one from another CPU's runqueue. If it fails to steal a thread from another runqueue it will pick its own Idle thread. To decide which thread should be picked, the scheduler evaluate t