Skip to content

NAS-139627 / 25.10.2.2 / NTB: ntb_transport: Preallocate memory windows (by amotin)#242

Merged
yocalebo merged 1 commit intorelease/25.10.2.2from
NAS-139627-25.10.2.2
Mar 4, 2026
Merged

NAS-139627 / 25.10.2.2 / NTB: ntb_transport: Preallocate memory windows (by amotin)#242
yocalebo merged 1 commit intorelease/25.10.2.2from
NAS-139627-25.10.2.2

Conversation

@bugclerk
Copy link

@bugclerk bugclerk commented Mar 4, 2026

Original Linux code allocated memory on every link up and freed on every link down. It may be a problem to allocate several MBs of physically contiguous memory on a running system. To workaround that, speculatively pre-allocate it on boot and then reallocate only if remote host requests different parameters, which should be very rare.

This replicates the logic we used on FreeBSD.

Original PR: #240

Original Linux code allocated memory on every link up and freed on
every link down.  It may be a problem to allocate several MBs of
physically contiguous memory on a running system.  To workaround
that, speculatively pre-allocate it on boot and then reallocate
only if remote host requests different parameters, which should
be very rare.

(cherry picked from commit 0852db2)
@yocalebo yocalebo requested a review from amotin March 4, 2026 13:00
@bugclerk
Copy link
Author

bugclerk commented Mar 4, 2026

@yocalebo yocalebo merged commit cdee7cd into release/25.10.2.2 Mar 4, 2026
6 checks passed
@yocalebo yocalebo deleted the NAS-139627-25.10.2.2 branch March 4, 2026 13:54
@bugclerk
Copy link
Author

bugclerk commented Mar 4, 2026

This PR has been merged and conversations have been locked.
If you would like to discuss more about this issue please use our forums or raise a Jira ticket.

@truenas truenas locked as resolved and limited conversation to collaborators Mar 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants