How to stop the thread from yielding per 20ms?
Ryan Yates
fryguybob at gmail.com
Sat Jul 4 14:08:42 UTC 2015
Hi Zhen,
The RTS flag -V sets the tick interval (setting to 0 disables). If you
grep for `RtsFlags.MiscFlags.tickInterval` you can find where it gets
used. Hope this helps.
Ryan
On Sat, Jul 4, 2015 at 6:25 AM, Zhen Zhang <izgzhen at gmail.com> wrote:
> Hi,
>
> I am trying to stop the GHC thread scheduler from atomically do
> round-robin scheduling. It might be strange that I am asking for that, in
> fact, my intention is to implement the “Lightweight Concurrency” on top of
> current RTS system. I am trying to use `GHC.Event`’s timeout mechanism to
> interfere with the scheduling behavior and it seems working a bit. But the
> automatic scheduling at the same time by RTS renders this effort invalid.
>
> For this part, I have tried to modify `rts/Scheduler.c`, masked some
> `startTimer` in `schedule()`, change the `appendToQueue` to `pushOnQueue`
> in `scheduleHandleYield` but nothing really works. (The GHC is still doing
> RR scheduling, even I changed some key code I thought)
>
> So I am curious if anyone familiar with the RTS could give me some
> suggestions on this problem.
>
> Thanks a lot!
>
> Zhen
>
>
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20150704/1ec0d0df/attachment.html>
More information about the ghc-devs
mailing list