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

Smarter memory allocation in fdt creation #272

Open
npiggin opened this issue May 27, 2022 · 0 comments
Open

Smarter memory allocation in fdt creation #272

npiggin opened this issue May 27, 2022 · 0 comments

Comments

@npiggin
Copy link
Contributor

npiggin commented May 27, 2022

Currently fdt creation just loops on ENOSPC, doubling the malloc size and trying again.

4 node Denali (d5) the device tree has just exceeded the 512k initial malloc size. This causes a scary looking error message and throws out all the fdt work to start again.

Might be better to instead allow size failures to realloc the fdt (except in the opal call case) and continue. This may cost a memcpy but it should be much cheaper than rebuilding the whole tree each time. Initial allocation and increment sizes could be more conservative to save memory too.

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