I was reading some documents about scheduler, to my understanding there will be no long_schedule issue since BIF has trap mechanism. Then I found this, I couldn't understand, the reduction is keeping increasing, why the BIF(lists:seq) is not interrupted for more than 10ms ?
1> erlang:system_monitor(self(),[{long_schedule, 10}]).
3>flush().
Shell got {monitor,<0.65.0>,long_schedule,
[{timeout,21},
{in,{lists,seq_loop,3}},
{out,{lists,seq_loop,3}}]}
Shell got {monitor,<0.65.0>,long_schedule,
[{timeout,38},
{in,{lists,seq_loop,3}},
{out,{lists,seq_loop,3}}]}
Shell got {monitor,<0.65.0>,long_schedule,
[{timeout,17},
{in,{lists,seq_loop,3}},
{out,{lists,seq_loop,3}}]}
Shell got {monitor,<0.65.0>,long_schedule,
[{timeout,21},
{in,{lists,seq_loop,3}},
{out,{lists,seq_loop,3}}]}
Shell got {monitor,<0.65.0>,long_schedule,
[{timeout,23},
{in,{lists,seq_loop,3}},
{out,{lists,seq_loop,3}}]}
Shell got {monitor,<0.65.0>,long_schedule,
[{timeout,31},
{in,{lists,seq_loop,3}},
{out,{lists,seq_loop,3}}]}
Shell got {monitor,<0.65.0>,long_schedule,
[{timeout,30},
{in,{lists,seq_loop,3}},
{out,{lists,seq_loop,3}}]}
Shell got {monitor,<0.65.0>,long_schedule,
[{timeout,43},
{in,{lists,seq_loop,3}},
{out,{lists,seq_loop,3}}]}
Shell got {monitor,<0.65.0>,long_schedule,
[{timeout,53},
{in,{lists,seq_loop,3}},
{out,{lists,seq_loop,3}}]}
Shell got {monitor,<0.65.0>,long_schedule,
[{timeout,56},
{in,{lists,seq_loop,3}},
{out,{lists,seq_loop,3}}]}
Shell got {monitor,<0.65.0>,long_schedule,
[{timeout,51},
{in,{lists,seq_loop,3}},
{out,{lists,seq_loop,3}}]}
Shell got {monitor,<0.65.0>,long_schedule,
[{timeout,81},
{in,{lists,seq_loop,3}},
{out,{lists,seq_loop,3}}]}
Shell got {monitor,<0.65.0>,long_schedule,
[{timeout,17},
{in,{lists,seq_loop,3}},
{out,{lists,seq_loop,3}}]}
Shell got {monitor,<0.65.0>,long_schedule,
[{timeout,18},
{in,{lists,seq_loop,3}},
{out,{lists,seq_loop,3}}]}
Shell got {monitor,<0.65.0>,long_schedule,
[{timeout,110},
{in,{lists,seq_loop,3}},
{out,{lists,seq_loop,3}}]}
Shell got {monitor,<0.65.0>,long_schedule,
[{timeout,74},
{in,{lists,seq_loop,3}},
{out,{lists,seq_loop,3}}]}
Shell got {monitor,<0.65.0>,long_schedule,
[{timeout,24},
{in,{lists,seq_loop,3}},
{out,{lists,seq_loop,3}}]}
Shell got {monitor,<0.65.0>,long_schedule,
[{timeout,76},
{in,{lists,seq_loop,3}},
{out,{lists,seq_loop,3}}]}
Shell got {monitor,<0.65.0>,long_schedule,
[{timeout,112},
{in,{lists,seq_loop,3}},
{out,{lists,seq_loop,3}}]}
Shell got {monitor,<0.65.0>,long_schedule,
[{timeout,43},
{in,{lists,seq_loop,3}},
{out,{lists,seq_loop,3}}]}
Shell got {monitor,<0.65.0>,long_schedule,
[{timeout,130},
{in,{lists,seq_loop,3}},
{out,{lists,seq_loop,3}}]}
Shell got {monitor,<0.65.0>,long_schedule,
[{timeout,205},
{in,{lists,seq_loop,3}},
{out,{lists,seq_loop,3}}]}
Shell got {monitor,<0.65.0>,long_schedule,
[{timeout,77},
{in,{lists,seq_loop,3}},
{out,{lists,seq_loop,3}}]}