Commit 2b5715f
RDMA/srp: Fix support for unpopulated and unbalanced NUMA nodes
The current code computes a number of channels per SRP target and spreads
them equally across all online NUMA nodes. Each channel is then assigned
a CPU within this node.
In the case of unbalanced, or even unpopulated nodes, some channels do not
get a CPU associated and thus do not get connected. This causes the SRP
connection to fail.
This patch solves the issue by rewriting channel computation and
allocation:
- Drop channel to node/CPU association as it had no real effect on
locality but added unnecessary complexity.
- Tweak the number of channels allocated to reduce CPU contention when
possible:
- Up to one channel per CPU (instead of up to 4 by node)
- At least 4 channels per node, unless ch_count module parameter is
used.
Link: https://lore.kernel.org/r/9cb4d9d3-30ad-2276-7eff-e85f7ddfb411@suse.com
Signed-off-by: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>1 parent 68ad4d1 commit 2b5715f
1 file changed
Lines changed: 45 additions & 65 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3628 | 3628 | | |
3629 | 3629 | | |
3630 | 3630 | | |
3631 | | - | |
| 3631 | + | |
3632 | 3632 | | |
3633 | 3633 | | |
3634 | 3634 | | |
| |||
3753 | 3753 | | |
3754 | 3754 | | |
3755 | 3755 | | |
3756 | | - | |
| 3756 | + | |
3757 | 3757 | | |
3758 | | - | |
3759 | | - | |
3760 | | - | |
3761 | | - | |
3762 | | - | |
| 3758 | + | |
| 3759 | + | |
| 3760 | + | |
| 3761 | + | |
| 3762 | + | |
| 3763 | + | |
3763 | 3764 | | |
3764 | 3765 | | |
3765 | 3766 | | |
3766 | 3767 | | |
3767 | 3768 | | |
3768 | | - | |
3769 | | - | |
3770 | | - | |
3771 | | - | |
3772 | | - | |
3773 | | - | |
3774 | | - | |
3775 | | - | |
3776 | | - | |
3777 | | - | |
3778 | | - | |
3779 | | - | |
3780 | | - | |
3781 | | - | |
3782 | | - | |
3783 | | - | |
3784 | | - | |
3785 | | - | |
3786 | | - | |
3787 | | - | |
3788 | | - | |
3789 | | - | |
3790 | | - | |
3791 | | - | |
3792 | | - | |
3793 | | - | |
| 3769 | + | |
| 3770 | + | |
| 3771 | + | |
| 3772 | + | |
| 3773 | + | |
| 3774 | + | |
| 3775 | + | |
| 3776 | + | |
| 3777 | + | |
3794 | 3778 | | |
3795 | | - | |
3796 | | - | |
3797 | | - | |
| 3779 | + | |
| 3780 | + | |
| 3781 | + | |
3798 | 3782 | | |
3799 | | - | |
3800 | | - | |
3801 | | - | |
| 3783 | + | |
| 3784 | + | |
| 3785 | + | |
3802 | 3786 | | |
3803 | | - | |
3804 | | - | |
3805 | | - | |
3806 | | - | |
3807 | | - | |
3808 | | - | |
3809 | | - | |
3810 | | - | |
3811 | | - | |
3812 | | - | |
3813 | | - | |
3814 | | - | |
3815 | | - | |
3816 | | - | |
3817 | | - | |
3818 | | - | |
3819 | | - | |
3820 | | - | |
3821 | | - | |
3822 | | - | |
3823 | | - | |
3824 | | - | |
3825 | | - | |
| 3787 | + | |
| 3788 | + | |
| 3789 | + | |
3826 | 3790 | | |
3827 | | - | |
3828 | | - | |
| 3791 | + | |
| 3792 | + | |
| 3793 | + | |
| 3794 | + | |
| 3795 | + | |
| 3796 | + | |
| 3797 | + | |
| 3798 | + | |
| 3799 | + | |
| 3800 | + | |
| 3801 | + | |
| 3802 | + | |
| 3803 | + | |
| 3804 | + | |
| 3805 | + | |
| 3806 | + | |
| 3807 | + | |
| 3808 | + | |
3829 | 3809 | | |
3830 | | - | |
| 3810 | + | |
3831 | 3811 | | |
3832 | 3812 | | |
3833 | 3813 | | |
| |||
0 commit comments