[PATCH v5 for-4.13 3/7] mlx5: move affinity hints assignments to generic code

Christoph Hellwig hch at lst.de
Fri Jun 16 02:47:46 PDT 2017


>  
> +static int mlx5e_get_node(struct mlx5e_priv *priv, int ix)
> +{
> +	return pci_irq_get_node(priv->mdev->pdev, MLX5_EQ_VEC_COMP_BASE + ix);
> +}

This helper seems very useful indeed..

>  	rq->mpwqe.info = kzalloc_node(wq_sz * sizeof(*rq->mpwqe.info),
> -				      GFP_KERNEL, cpu_to_node(c->cpu));
> +					GFP_KERNEL, node);

Why the reindenting?

>  	/* We allocate more than mtt_sz as we will align the pointer */
> -	rq->mpwqe.mtt_no_align = kzalloc_node(mtt_alloc * wq_sz, GFP_KERNEL,
> -					cpu_to_node(c->cpu));
> +	rq->mpwqe.mtt_no_align = kzalloc_node(mtt_alloc * wq_sz,
> +					GFP_KERNEL, node);

Or the moving of GFP_KERNEL to the next line here?



More information about the Linux-nvme mailing list