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

smsc/xpmem: alignment and stack memory space #10127

Merged
merged 2 commits into from
Nov 10, 2022

Conversation

devreal
Copy link
Contributor

@devreal devreal commented Mar 16, 2022

This PR addresses two issues identified in #10121:

  1. The aligned upper bound was off by 1.
  2. We may not be able to map the full aligned range if the memory points to the stack. In that case we should try again with the requested upper bound.

Signed-off-by: Joseph Schuchart [email protected]

@hjelmn
Copy link
Member

hjelmn commented Mar 17, 2022

Bounds when it comes to rcache registration are the last byte of the range. Probably doesn't matter much here as no rcache is in use.

@devreal
Copy link
Contributor Author

devreal commented Mar 18, 2022

I changed the fallback to align to the actual page size, which seems to work as well and reduces the number of times we may need to remap until we have mapped all the relevant stack positions mapped.

@awlauria awlauria requested a review from bosilca April 13, 2022 14:44
@devreal
Copy link
Contributor Author

devreal commented May 10, 2022

@hjelmn Can you please take a look at this PR?

@devreal
Copy link
Contributor Author

devreal commented Sep 19, 2022

Rebased to current main. Can someone please review?

@bwbarrett
Copy link
Member

bot:aws:retest

@awlauria
Copy link
Contributor

@devreal I think you'll want to rebase and force push again.

The upper bound of the mapped region must include the last byte of
the range and not reach past the aligned range.

Signed-off-by: Joseph Schuchart <[email protected]>
…pped

The aligned range computed in mca_smsc_xpmem_map_peer_region may
reach past the end of the stack, which may cause the mapping to fail.
Retrying with an actual page as upper bound has a better chance to succeed.

Signed-off-by: Joseph Schuchart <[email protected]>
@awlauria
Copy link
Contributor

bot:aws:retest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants