[Intel-gfx] [RFC 6/7] lib/scatterlist: Add sg_trim_table
Tvrtko Ursulin
tvrtko.ursulin at linux.intel.com
Thu Oct 13 09:51:15 UTC 2016
On 13/10/2016 10:23, Chris Wilson wrote:
> 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.
Thought about it but did not like having to handle another source of
failures. Hm, don't know. Will think about it.
Regards,
Tvrtko
More information about the Intel-gfx
mailing list