[Intel-gfx] [PATCH 3/3] drm/i915/gt: Shrink i915_page_directory's slab bucket
Matthew Auld
matthew.auld at intel.com
Tue Jul 28 15:41:08 UTC 2020
On 28/07/2020 16:31, Chris Wilson wrote:
> kmalloc uses power-of-two slab buckets for small allocations (up to a
> few pages). Since i915_page_directory is a page of pointers, plus a
> couple more, this is rounded up to 8K, and we waste nearly 50% of that
> allocation. Long terms this leads to poor memory utilisation, bloating
> the kernel footpoint, but the problem is excerbated by our conservative
footprint exacerbated
> preallocation scheme for binding VMA. As we require to allocate all
> levels for each vma just in case we need to insert them upon binding,
> this leads to a large multiplication factor for single page vma. By
> halving the allocation we need for the page directory structure, we
> halve the multipliation factor, bringing workloads that once fitted into
multiplication
> memory, hopefully back to fitting into memory.
>
> We maintain the split between i915_page_directory and i915_page_table as
> we only need half the allocation for the lowest, most populous, level.
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala at linux.intel.com>
> Cc: Matthew Auld <matthew.auld at intel.com>
Nice find,
Reviewed-by: Matthew Auld <matthew.auld at intel.com>
More information about the Intel-gfx
mailing list