Skip to content

Optimize register access in fault handler#219

Open
ZhanYF wants to merge 1 commit intomainfrom
yifei/regs-size
Open

Optimize register access in fault handler#219
ZhanYF wants to merge 1 commit intomainfrom
yifei/regs-size

Conversation

@ZhanYF
Copy link
Copy Markdown
Contributor

@ZhanYF ZhanYF commented Apr 14, 2026

For write fault we only need to touch a single register for fault_advance, to not do a full write, introduce a regs_size argument to fault_advance_vcpu and pass it to seL4_TCB_WriteRegisters.

The actual optimization depends on this commit in seL4: seL4/seL4@19a520a

For write fault we only need to touch a single register for fault_advance,
to not do a full write, introduce a regs_size argument to fault_advance_vcpu
and pass it to seL4_TCB_WriteRegisters.

The actual optimization depends on this commit in seL4:
seL4/seL4@19a520a

Signed-off-by: Yifei Zhan <yifei@zhan.science>
@ZhanYF ZhanYF requested a review from Ivan-Velickovic April 14, 2026 08:11
@Ivan-Velickovic
Copy link
Copy Markdown
Collaborator

@ZhanYF do you have any numbers to indicate how much the optimisation helps?

@ZhanYF
Copy link
Copy Markdown
Contributor Author

ZhanYF commented Apr 29, 2026

@ZhanYF do you have any numbers to indicate how much the optimisation helps?

The worst case is 50 cycles reduction on fault handling on odroidc4, my previous tests showed about 300 cycles but I can no longer reliably reproduce it. Terry mentioned there is a throughput increase of 120Mb/s -> 131Mb/s for virtio.

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.

2 participants