[PATCH 10/15] powerpc/powernv/pci: Refactor pnv_ioda_alloc_pe()

Oliver O'Halloran oohall at gmail.com
Wed Jul 15 12:53:43 AEST 2020


On Wed, Jul 15, 2020 at 12:29 PM Alexey Kardashevskiy <aik at ozlabs.ru> wrote:
>
>
>
> On 10/07/2020 15:23, Oliver O'Halloran wrote:
> > Rework the PE allocation logic to allow allocating blocks of PEs rather
> > than individually. We'll use this to allocate contigious blocks of PEs for
> > the SR-IOVs.
>
> The patch does not do just this, it also adds missing mutexes (which is
> good) but still misses them in pnv_pci_sriov_disable() and
> pnv_pci_ioda_pe_dump().

The current implementation doesn't need the mutex because alloc,
reserve and free all use atomic bit ops. The mutex has been there
forever with nothing actually using it, but with the change we need to
prevent modifications to the bitmap while alloc() is scanning it. I
probably should have mentioned that in the commit message.


More information about the Linuxppc-dev mailing list