Commit 04d0ea3
committed
Merge: SUNRPC: Cleanup/fix initial rq_pages allocation
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/7068
JIRA: https://issues.redhat.com/browse/RHEL-91267
Conflicts: This RHEL-9 version is quite a bit different from the upstream
version because the original fix for this problem conflicted with a
series to "Allocate payload arrays dynamically":
https://lore.kernel.org/linux-nfs/[email protected]/
Thus, the upstream fix referenced here keeps svc_init_buffer to allow
the page array allocation. We're not ready for this new work to land in
RHEL-9 and if we do take it we'll need to take this fix again afterward.
This version corresponds to the v1 fix posted here:
https://lore.kernel.org/linux-nfs/458f45b2b7259c17555dd65aa7cdbbf1a459d5e6.1749131924.git.bcodding@redhat.com/
The result is the same - we don't do the bulk array allocation in
svc_init_buffer() because we lack the required retry logic to allocate
the whole range.
commit 8b3ac9f
Author: Benjamin Coddington <[email protected]>
Date: Mon Jun 9 13:21:56 2025 -0400
SUNRPC: Cleanup/fix initial rq_pages allocation
While investigating some reports of memory-constrained NUMA machines
failing to mount v3 and v4.0 nfs mounts, we found that svc_init_buffer()
was not attempting to retry allocations from the bulk page allocator.
Typically, this results in a single page allocation being returned and
the mount attempt fails with -ENOMEM. A retry would have allowed the mount
to succeed.
Additionally, it seems that the bulk allocation in svc_init_buffer() is
redundant because svc_alloc_arg() will perform the required allocation and
does the correct thing to retry the allocations.
The call to allocate memory in svc_alloc_arg() drops the preferred node
argument, but I expect we'll still allocate on the preferred node because
the allocation call happens within the svc thread context, which chooses
the node with memory closest to the current thread's execution.
This patch cleans out the bulk allocation in svc_init_buffer() to allow
svc_alloc_arg() to handle the allocation/retry logic for rq_pages.
Signed-off-by: Benjamin Coddington <[email protected]>
Reviewed-by: Jeff Layton <[email protected]>
Fixes: ed603bc ("sunrpc: Replace the rq_pages array with dynamically-allocated memory")
Signed-off-by: Chuck Lever <[email protected]>
Signed-off-by: Benjamin Coddington <[email protected]>
Approved-by: Olga Kornievskaia <[email protected]>
Approved-by: Paulo Alcantara <[email protected]>
Approved-by: Scott Mayhew <[email protected]>
Approved-by: CKI KWF Bot <[email protected]>
Merged-by: Augusto Caringi <[email protected]>1 file changed
+0
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
630 | 630 | | |
631 | 631 | | |
632 | 632 | | |
633 | | - | |
634 | | - | |
635 | | - | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | | - | |
645 | | - | |
646 | | - | |
647 | | - | |
648 | | - | |
649 | | - | |
650 | | - | |
651 | | - | |
652 | | - | |
653 | | - | |
654 | 633 | | |
655 | 634 | | |
656 | 635 | | |
| |||
690 | 669 | | |
691 | 670 | | |
692 | 671 | | |
693 | | - | |
694 | | - | |
695 | | - | |
696 | 672 | | |
697 | 673 | | |
698 | 674 | | |
| |||
0 commit comments