Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Penalizing system calls and expensive instructions #189

Open
fwsGonzo opened this issue Jul 6, 2024 · 1 comment
Open

Penalizing system calls and expensive instructions #189

fwsGonzo opened this issue Jul 6, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@fwsGonzo
Copy link
Owner

fwsGonzo commented Jul 6, 2024

Penalize used to reduce max instructions, however it was incompatible with long-running VMs that pause and resume a lot. The reason is that max instructions would eventually become 0 which indicates a stopped machine.

So, for now the solution is to use the regular instruction counter for penalties. It means that instruction counting is now mostly wrong. But perhaps we can one day use a separate penalty counter, where instruction_counter - penalty = real instruction count. The most important thing is to not modify dispatch too much.

@fwsGonzo fwsGonzo added the enhancement New feature or request label Jul 6, 2024
@fwsGonzo fwsGonzo changed the title Penalizing system calls Penalizing system calls and expensive instructions Jul 6, 2024
@fwsGonzo
Copy link
Owner Author

fwsGonzo commented Jul 6, 2024

Some work done here: #190

Future work:

  • Penalize atomic instructions
  •  Penalize expensive bit-manipulation (eg. CLMUL, CLMULR and CLMULH)
  • Penalize DIV, DIVU, DIVW, DIVUW, REM, REMU, REMW, REMUW, (?)
  • FENCE?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant