[Intel-gfx] [RFC 6/7] lib/scatterlist: Add sg_trim_table
Chris Wilson
chris at chris-wilson.co.uk
Thu Oct 13 09:23:36 UTC 2016
On Thu, Oct 13, 2016 at 10:04:03AM +0100, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
>
> *** BROKEN *** RFC only *** BROKEN ***
>
> In cases where it is hard to know to minimum numbers of ents
> table will need to hold at sg_alloc_time, and we end up with
> a table with unused sg entries at its end, this function will
> trim (free) the unused sg entry blocks and adjust the
> table->orig_nents down.
An alternative I had in mind, was to allocate the new chunks
iteratively, i.e. as we run out of room in i915_sg_add_page.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list