Skip to content

perf(quickemu): tune TCG translation cache and enable multithreaded TCG#1824

Merged
flexiondotorg merged 1 commit intomasterfrom
tcg
Jan 25, 2026
Merged

perf(quickemu): tune TCG translation cache and enable multithreaded TCG#1824
flexiondotorg merged 1 commit intomasterfrom
tcg

Conversation

@flexiondotorg
Copy link
Member

  • Add TCG-specific runtime optimisations in vm_boot for cross-architecture VMs
  • Detect host RAM and set tb-size to 512 for hosts with >=16GB, otherwise 256
  • Append -accel tcg,tb-size=${TCG_TB_SIZE},thread=multi to QEMU args
  • Improve TCG translation cache behaviour and SMP performance for TCG guests

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist:

  • I have performed a self-review of my code
  • I have tested my code in common scenarios and confirmed there are no regressions

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 1 file

Confidence score: 5/5

  • Minor style consistency issue: TCG_TB_SIZE should be declared local like HOST_RAM_GB, but this is low severity and unlikely to affect behavior.
  • Low-impact housekeeping only, so merge risk appears minimal.
  • Pay close attention to quickemu - ensure TCG_TB_SIZE is declared local for consistency.
Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="quickemu">

<violation number="1" location="quickemu:1681">
P3: `TCG_TB_SIZE` should be declared as `local` for consistency with `HOST_RAM_GB` and the codebase's pattern of using local variables in functions.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

- Add TCG-specific runtime optimisations in vm_boot for
cross-architecture VMs
- Detect host RAM and set tb-size to 512 for hosts with >=16GB,
otherwise 256
- Append -accel tcg,tb-size=${TCG_TB_SIZE},thread=multi to QEMU args
- Improve TCG translation cache behaviour and SMP performance for TCG
guests

Signed-off-by: Martin Wimpress <martin@wimpress.org>
@flexiondotorg
Copy link
Member Author

@cubic-dev-ai

@cubic-dev-ai
Copy link
Contributor

cubic-dev-ai bot commented Jan 25, 2026

@cubic-dev-ai

@flexiondotorg I have started the AI code review. It will take a few minutes to complete.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

@flexiondotorg flexiondotorg merged commit 81b99fe into master Jan 25, 2026
4 of 5 checks passed
@flexiondotorg flexiondotorg deleted the tcg branch January 25, 2026 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant