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

Track paddr in all untypeds, not just device #50

Open
mullr opened this issue Aug 14, 2019 · 0 comments
Open

Track paddr in all untypeds, not just device #50

mullr opened this issue Aug 14, 2019 · 0 comments

Comments

@mullr
Copy link
Collaborator

mullr commented Aug 14, 2019

Currently device untypeds track paddr in their MemoryKind. Move this up to {W}Untyped so it applies to all untypeds, and add a public paddr method to obtain the information.

Rationale: We need the physical address of regular memory to set up dma transfers. We currently get this by asking the kernel about a page address. This is not ideal because it's another syscall that's not necessarily needed. There are also cases where we might want to reason about general untypeds with knowledge of their physical address before we turn them into pages, perhaps to take advantage of platform NUMA characteristics.

This change also cleans up some General/Device memory distinctions, making the code a bit easier to understand.

Anti-Rationale: the kernel is tracking this and making it available, so we shouldn't re-track it ourselves.

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

No branches or pull requests

1 participant