Re: [PATCH] dma-debug: dynamic allocation of hash table
From: Eric Dumazet
Date: Fri Jan 31 2020 - 09:42:44 EST
On Fri, Jan 31, 2020 at 4:30 AM Robin Murphy <robin.murphy@xxxxxxx> wrote:
>
> ...and when that represents ~5% of the total system RAM it is a *lot*
> less reasonable than even 12KB. As I said, it's great to make a debug
> option more efficient such that what it observes is more representative
> of the non-debug behaviour, but it mustn't come at the cost of making
> the entire option unworkable for other users.
>
Then I suggest you send a patch to reduce PREALLOC_DMA_DEBUG_ENTRIES
because having 65536 preallocated entries consume 4 MB of memory.
Actually this whole attempt to re-implement slab allocations in this
file is suspect.
Do not get me wrong, but if you really want to run linux on a 16MB host,
I guess you need to add CONFIG_BASE_SMALL all over the places,
not only in this kernel/dma/debug.c file.