Skip to content

Make bignum arithmetic count reductions#11274

Open
bjorng wants to merge 1 commit into
erlang:maintfrom
bjorng:bjorn/erts/arith-reductions/OTP-20211
Open

Make bignum arithmetic count reductions#11274
bjorng wants to merge 1 commit into
erlang:maintfrom
bjorng:bjorn/erts/arith-reductions/OTP-20211

Conversation

@bjorng

@bjorng bjorng commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

This will make scheduling fairer when doing many arithmetic operations with large integers.

@bjorng bjorng self-assigned this Jun 22, 2026
@bjorng bjorng added team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI labels Jun 22, 2026
@bjorng bjorng changed the base branch from master to maint June 22, 2026 11:50
@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

CT Test Results

    3 files    136 suites   47m 38s ⏱️
1 680 tests 1 624 ✅ 56 💤 0 ❌
2 323 runs  2 249 ✅ 74 💤 0 ❌

Results for commit 4606e5e.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@bjorng bjorng force-pushed the bjorn/erts/arith-reductions/OTP-20211 branch from a59a1be to 0439e96 Compare June 22, 2026 12:00
@bjorng bjorng removed the testing currently being tested, tag is used by OTP internal CI label Jun 22, 2026
@bjorng bjorng force-pushed the bjorn/erts/arith-reductions/OTP-20211 branch from 0439e96 to 28b5d22 Compare June 22, 2026 13:27
@bjorng bjorng added the testing currently being tested, tag is used by OTP internal CI label Jun 23, 2026
@bjorng bjorng force-pushed the bjorn/erts/arith-reductions/OTP-20211 branch 2 times, most recently from be8fe3c to 340fe5e Compare June 23, 2026 11:59
@bjorng bjorng requested a review from sverker June 24, 2026 05:40
Comment thread erts/emulator/beam/erl_arith.c Outdated
Comment thread erts/emulator/test/big_SUITE.erl
@bjorng bjorng force-pushed the bjorn/erts/arith-reductions/OTP-20211 branch from 340fe5e to b89942a Compare June 24, 2026 13:50
Comment thread erts/emulator/beam/erl_arith.c Outdated
@bjorng bjorng force-pushed the bjorn/erts/arith-reductions/OTP-20211 branch from b89942a to a1b381c Compare June 24, 2026 14:04
@bjorng bjorng requested a review from sverker June 24, 2026 14:20
@sverker sverker self-requested a review June 24, 2026 16:07

@sverker sverker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The BUMP_REDS macro contains a lock check assertion that fails when called from a match spec that passes a dummy pseudo process as argument.

#5  0x56785602 in erts_lc_assert_failed (file=0x56a15725 "beam/erl_arith.c", line=400, assertion=0x569bc850 "ERTS_PROC_LOCK_MAIN & erts_proc_lc_my_proc_locks(p)") at beam/erl_lock_check.c:742
#6  0x5671562b in erts_mixed_plus (p=0xf3f23ce0, arg1=, arg2=3999773434) at beam/erl_arith.c:400
#7  0x567157b4 in splus_2 (A__p=0xf3f23ce0, BIF__ARGS=0xf5261ef0, A__I=0x0) at beam/erl_arith.c:72
#8  0x56757892 in db_prog_match (c_p=, self=, bprog=, term=, termp=, arity=, in_flags=, return_flags=) at beam/erl_db_util.c:2595

Provoked by debug emulator with
stdlib/test/ets_SUITE:t_match_spec_run
emulator/test/match_spec_SUITE:trace_control_word

@bjorng bjorng force-pushed the bjorn/erts/arith-reductions/OTP-20211 branch 2 times, most recently from 03016e8 to c918683 Compare June 25, 2026 06:06
@bjorng bjorng requested a review from sverker June 25, 2026 06:07
@bjorng

bjorng commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

I've added a test to avoid bumping reductions for pseudo processes.

This will make scheduling fairer when doing many arithmetic operations
with large integers.
@bjorng bjorng force-pushed the bjorn/erts/arith-reductions/OTP-20211 branch from c918683 to 4606e5e Compare June 25, 2026 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants