[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6e8ca917-32a7-5c0a-60c0-a266c3fbb163@arm.com>
Date: Tue, 4 Dec 2018 16:06:43 +0000
From: Robin Murphy <robin.murphy@....com>
To: Christoph Hellwig <hch@....de>
Cc: John Garry <john.garry@...wei.com>, m.szyprowski@...sung.com,
iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
cai@....us, salil.mehta@...wei.com
Subject: Re: [PATCH 3/4] dma-debug: Dynamically expand the dma_debug_entry
pool
On 04/12/2018 14:17, Christoph Hellwig wrote:
> On Tue, Dec 04, 2018 at 01:11:37PM +0000, Robin Murphy wrote:
>> 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.
>
> Yes, we should defintively kill dma_debug_resize_entries. Allocating
> page batches might sound nice, but is that going to introduce additional
> complexity?
OK, looking at what the weird AMD GART code does I reckon it should be
happy enough with on-demand expansion, and that no tears will be shed if
it can no longer actually trim the pool to the size it thinks is
necessary. I'll add a patch to clean that up.
Page-based allocation, at least the way I'm thinking of it, shouldn't do
much more than add an extra loop in one place, which should be more than
made up for by removing all the freeing code :)
Robin.
Powered by blists - more mailing lists