[Skiboot] [PATCH v2] hw/phb4: Tune GPU direct performance on witherspoon in PCI mode
Oliver O'Halloran
oohall at gmail.com
Wed Mar 25 16:11:35 AEDT 2020
On Wed, Mar 25, 2020 at 4:51 AM Frederic Barrat <fbarrat at linux.ibm.com> wrote:
>
> +
> +static void witherspoon_pci_probe_complete(void)
> +{
> + struct pci_device *dev;
> + struct phb *phb;
> + struct phb4 *p;
> +
> + /*
> + * Reallocate dma engines between stacks in PEC2 if a Mellanox
> + * card is found on the shared slot, as it is required to get
> + * good GPU direct performance.
> + */
> + for_each_phb(phb) {
> + p = phb_to_phb4(phb);
> + if (p->index != 3)
> + continue;
I think you need to check phb->type == phb_type_pcie_v4 before dereferencing p.
> + dev = pci_walk_dev(phb, NULL, check_mlx_cards, NULL);
> + if (dev)
> + phb4_pec2_dma_engine_realloc(p);
> + }
> +}
More information about the Skiboot
mailing list