8000 fix: frequent context switch leads to IRQ being silenced by elebirds · Pull Request #9 · arceos-org/axcpu · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: frequent context switch leads to IRQ being silenced #9

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

elebirds
Copy link
Contributor

This 8000 PR is a reviewed feature from downstream oscamp/arceos.

For further information, please refer to: oscomp/arceos#42, oscomp/arceos#44

Description

This pull request introduces interrupt masking and unmasking functionality across multiple architectures to ensure proper handling of exceptions and interrupts. The changes add mask_irqs and unmask_irqs functions for managing interrupt states and integrate them into various exception and interrupt handlers.

Additional Notes

This is a step towards gradually merging downstream oscamp/arceos into the main branch.

Copy link
Member
@equation314 equation314 left a comment

Choose a reason for hiding this comment

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

By default, IRQs are masked during exception handling, and whether to unmask IRQs is designed to left to the external exception handler (e.g., in starry's syscall handler), which makes it easier for the crate to be reused by other kernels.

@AsakuraMizu
Copy link
Contributor
AsakuraMizu commented Jun 22, 2025

and whether to unmask IRQs is designed to left to the external exception handler (e.g., in starry's syscall handler)

So do you suggest that we could provide something similar to what is in kernel_guard, perhaps called IrqRestore, and use that in specific OS syscall handler or page fault handler? (It shouldn't be in kernel_guard though)

@equation314
Copy link
Member

So do you suggest that we could provide something similar to what is in kernel_guard, perhaps called IrqRestore, and use that in specific OS syscall handler or page fault handler? (It shouldn't be in kernel_guard though)

Why not use kernel_guard::IrqSave?

@AsakuraMizu
Copy link
Contributor

Why not use kernel_guard::IrqSave?

I believe they are different. IrqSave temporarily disables IRQ, but we want to temporarily enable it here.

@equation314
Copy link
Member

I believe they are different. IrqSave temporarily disables IRQ, but we want to temporarily enable it here.

My mistake, we could introduce this new guard in kernel_guard.

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.

3 participants
0