Re: [PATCH 6/6] lib/scatterlist: Drop order argument from sgl_free_n_order

From: Tvrtko Ursulin
Date: Thu Mar 08 2018 - 12:06:46 EST



On 08/03/18 15:56, Bart Van Assche wrote:
On Thu, 2018-03-08 at 07:59 +0000, Tvrtko Ursulin wrote:
However there is a different bug in my patch relating to the last entry
which can have shorter length from the rest. So get_order on the last
entry is incorrect - I have to store the deduced order and carry it over.

Will that work if there is only one entry in the list and if it is a short
entry?

Yeah, needs more work. I especially don't like that case (as in any other with a final short chunk) wasting memory. So it would need more refactoring to make it possible.

It did work in my internal tree where sgl_alloc_order was extended to become sgl_alloc_order_min_max, and as such uses a smaller order for smaller chunks.

This patch can be dropped for now but the earlier ones are still valid I think. On those one I think we have some opens on how to proceed so if you could reply there, where applicable, that would be great.

Regards,

Tvrtko