On 15/07/2020 12:53, Oliver O'Halloran wrote:
On Wed, Jul 15, 2020 at 12:29 PM Alexey Kardashevskiy [off-list ref] wrote:
quoted
On 10/07/2020 15:23, Oliver O'Halloran wrote:
quoted
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.
Ah, ok.
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.
but bitmap_clear() (from pnv_pci_sriov_disable()) is not atomic. It
probably does not matter as the next patch gets rid of it anyway.
--
Alexey