[erlang-patches] Disable scheduler sleep

Scott Lystig Fritchie fritchie@REDACTED
Fri May 17 23:38:32 CEST 2013


For the OTP team's consideration ... Disable scheduler sleep

For use in conjunction with "+scl false", for example:

    erl +scl false +zdnfgtse 500:500

See the discussion in these mailing list threads for more
background:

* http://erlang.org/pipermail/erlang-questions/2013-April/073490.html
* http://erlang.org/pipermail/erlang-bugs/2013-May/003529.html

As noted in the email threads, all R15B releases as well as R16B are
vulnerable to the schedulers falling asleep too agressively.  I've also
tested the future will-eventually-be-R16B01 from the OTP team's source
repo's "maint" branch, as described by:

    % git log | head -6
    commit a70d09b6e611771b467a91c7ebeca1e14390553a
    Merge: 8260029 fb8cbfa
    Author: Fredrik Gustafsson <fredrik@REDACTED>
    Date:   Fri May 17 10:03:30 2013 +0200
    
        Merge branch 'nm/mnesia_idx_insert_speedup/OTP-11103' into maint

... and it is vulnerable, also.

Patch info:

git fetch git://github.com/slfritchie/otp.git disable-scheduler-sleeps

https://github.com/slfritchie/otp/compare/erlang:maint...disable-scheduler-sleeps
https://github.com/slfritchie/otp/compare/erlang:maint...disable-scheduler-sleeps.patch

With this patch, release R16B and the today's "maint" branch are not
vulnerable when run with "erl +scl false +zdnfgtse 500:500".

This patch may be applied to the R15B releases and works correctly.
The "patch" utility will complain about some fuzz, but it should not
actually fail.

-Scott



More information about the erlang-patches mailing list