-
Notifications
You must be signed in to change notification settings - Fork 15
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
Replace MTD flash drives with PMEM drives #32
Conversation
1c7ee10
to
bed47c6
Compare
@@ -55,6 +55,7 @@ CONFIG_EXT2_FS_SECURITY=y | |||
CONFIG_EXT4_FS=y | |||
# CONFIG_PROC_PAGE_MONITOR is not set | |||
CONFIG_TMPFS=y | |||
CONFIG_HUGETLBFS=y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this screw with our TLB implementation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problems with this, we can use 2MB pages without problems even while only supporting 4KB pages in our TLB, because we have a conservative implementation of TLB that shootdown more than it could. And I already have tested this for a while now.
Actually this config is orthogonal to this PR and the init system, but it is used in World Arcade, and other dapps I am coding. I think we should enable this by default because it enables a way to map fixed physical pages to virtual memory in userspace with minimal overhead, useful for some advanced dapps that needs to write/read to programs in userspace from outside.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using huge pages for this feels like a hack. You could use UIO for this instead.
- You can have physically mapped memory into you dapp, emulator defines to where (via dtb).
- Optionally have multiple separate regions.
- Of arbitrary sizes.
It requires a dtb entry and the CONFIG_UIO
and CONFIG_UIO_PDRV_GENIRQ
kernel configs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a hack until we have a better way to do this, could be with custom DTB entries like you said, but this will require a new emulator feature to insert custom entries in DTB.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See question about TLB.
This is related to: