Thread (55 messages) flat view 55 messages, 4 authors, 2020-07-24

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

From: Alexey Kardashevskiy <hidden>
Date: 2020-07-15 03:18:25


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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help