[Intel-gfx] [PATCH 1/3] Introduce & use new SG page iterators
Chris Wilson
chris at chris-wilson.co.uk
Mon May 9 09:51:34 UTC 2016
On Mon, May 09, 2016 at 10:33:31AM +0100, Dave Gordon wrote:
> The existing for_each_sg_page() iterator is somewhat inconvenient; in
> particular, the 'nents' parameters is not expressed in any useful way,
> and so there is no way to get a precise (maximum) number of iterations
> (and therefore pages) without knowing that the SGL has been constructed
> in a specific way.
>
> So here we introduce for_each_sgt_page(), which simplifies the
> parameters down to just two: the iterator and an sg_table to iterate
> over. This is ideal where we simply need to process *all* the pages,
> regardless of how many there might be (e.g. put_pages()).
It seems to be a lot of churn for something that doesn't address my core
complaint with the iterator: it is too slow and *is* one of the
rate-limiting steps in some heavy workloads (games where we have to
rewrite the page tables frequently as their textures do not fit within
the GTT).
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list