From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751670AbcEIJvn (ORCPT ); Mon, 9 May 2016 05:51:43 -0400 Received: from mail.fireflyinternet.com ([87.106.93.118]:57617 "EHLO fireflyinternet.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750913AbcEIJvm (ORCPT ); Mon, 9 May 2016 05:51:42 -0400 X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Date: Mon, 9 May 2016 10:51:34 +0100 From: Chris Wilson To: Dave Gordon Cc: intel-gfx@lists.freedesktop.org, Imre Deak , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] Introduce & use new SG page iterators Message-ID: <20160509095134.GD8414@nuc-i3427.alporthouse.com> Mail-Followup-To: Chris Wilson , Dave Gordon , intel-gfx@lists.freedesktop.org, Imre Deak , linux-kernel@vger.kernel.org References: <1462786413-3899-1-git-send-email-david.s.gordon@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1462786413-3899-1-git-send-email-david.s.gordon@intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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