Re: [PATCH 3/4] dma-debug: Dynamically expand the dma_debug_entry pool

From: John Garry
Date: Tue Dec 04 2018 - 12:38:31 EST




In fact, having got this far in, what I'd quite like to do is to get rid
of dma_debug_resize_entries() such that we never need to free things at
all, since then we could allocate whole pages as blocks of entries to
save on masses of individual slab allocations.


On a related topic, is it possible for the user to learn the total
entries created at a given point in time? If not, could we add a file
in the debugfs folder for this?


Hi Robin,

I did get as far as pondering that you effectively lose track of
utilisation once the low-water-mark of min_free_entries hits 0 and stays

I did try your patches and I noticed this, i.e I was hitting the point at which we start to alloc more entries.

there - AFAICS it should be sufficient to just expose nr_total_entries
as-is, since users can then calculate current and maximum occupancy
based on *_free_entries. Does that sound reasonable to you?


Sounds ok. I am just interested to know roughly how many DMA buffers we're using in our system.

That also indirectly reminds me that this lot is documented in
DMA_API.txt, so I should be good and update that too...

Thanks,
John


Cheers,
Robin.

.