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

add configuration and build instructions #815

Open
matu3ba opened this issue Aug 2, 2023 · 3 comments
Open

add configuration and build instructions #815

matu3ba opened this issue Aug 2, 2023 · 3 comments

Comments

@matu3ba
Copy link

matu3ba commented Aug 2, 2023

Common configuration bits for usage of external software are missing and lookup is not explained.

For example, things like rg 'define.*_SC_PAGE_SIZE' -B 1 --vimgrep do not return any results and I am surprised, that your unikernel does not support (configurable) paging for improved performance.
The hermit-playground neither provides instruction for configuration.

Am I missing anything essential?

Posix specifies sysconf(_SC_PAGE_SIZE) to be used for the default page size the Kernel loader fills the aux vector with.

@stlankes
Copy link
Contributor

We map more or less everything at boot time. Only the stack will be mapped on demand (4K pages). For the heap, we try to use 1G pages as much as possible. Afterwards, we use 2M pages and in the end 4K pages. Consequently, we try to optimize performance with the usage of large pages.

@matu3ba
Copy link
Author

matu3ba commented Aug 10, 2023

For the heap, we try to use 1G pages as much as possible. Afterwards, we use 2M pages and in the end 4K pages. Consequently, we try to optimize performance with the usage of large pages.

So user space must assume 4KB page size then and code optimizations to take into account pointer alignment or page alignment sizes are not supported (yet)?
As example, one may want to use as small as possible indices types (ie to use the additional bits for tagging) or could plan beforehand with internal fragmentation and without allocation, if the page size can be relied upon.

@stlankes
Copy link
Contributor

Ah, you want to have a guarantee that the data is stored on a certain page size. Hm, currently, you have to assume 4K pages.

I will think about. Maybe be it exists a better solution to setup the heap.

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

2 participants