[PATCH v4 for-4.13 2/6] mlx5: move affinity hints assignments to generic code

Sagi Grimberg sagi at grimberg.me
Wed Jun 7 02:56:12 PDT 2017


>>   
>> @@ -1730,7 +1725,8 @@ static int mlx5e_open_channel(struct mlx5e_priv *priv, int ix,
>>   	c->mdev     = priv->mdev;
>>   	c->tstamp   = &priv->tstamp;
>>   	c->ix       = ix;
>> -	c->cpu      = cpu;
>> +	c->cpu      = cpumask_first(pci_irq_get_affinity(priv->mdev->pdev,
>> +			MLX5_EQ_VEC_COMP_BASE + ix));
> 
> ->cpu is only used to call cpu_to_node on it.  So remove it and switch
> the users to
> 
> 	pci_irq_get_node(priv->mdev->pdev)
> 
> instead.

I started with this, but its not exactly correct, channel cpu is used to
construct the xps cpumask, see: mlx5e_activate_channel()



More information about the Linux-nvme mailing list