From: Yufeng Mo moyufeng@huawei.com
driver inclusion category: bugfix bugzilla: NA CVE: NA
----------------------------
Currently, affinity_mask is set to a single value. As a result, irqbalance becomes invalid in SUBSET or EXACT mode. To solve this problem, change affinity_mask to a value range. In this way, irqbalance can be performed on the CPU of the NUMA node.
Signed-off-by: Yufeng Mo moyufeng@huawei.com Signed-off-by: Yonglong Liu liuyonglong@huawei.com Reviewed-by: Junxin Chen chenjunxin1@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index e9a04e72ae025..90dd2a2ebd38e 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -1452,15 +1452,12 @@ static int hclge_configure(struct hclge_dev *hdev)
hclge_init_kdump_kernel_config(hdev);
- /* Set the init affinity based on pci func number */ + /* Set the affinity based on numa node */ node = dev_to_node(&hdev->pdev->dev); if (node != NUMA_NO_NODE) cpumask = cpumask_of_node(node);
- i = cpumask_weight(cpumask); - i = i ? PCI_FUNC(hdev->pdev->devfn) % i : 0; - cpumask_set_cpu(cpumask_local_spread(i, dev_to_node(&hdev->pdev->dev)), - &hdev->affinity_mask); + cpumask_copy(&hdev->affinity_mask, cpumask);
return ret; }