From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932995AbcETANh (ORCPT ); Thu, 19 May 2016 20:13:37 -0400 Received: from mga02.intel.com ([134.134.136.20]:56940 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932921AbcETANe (ORCPT ); Thu, 19 May 2016 20:13:34 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,336,1459839600"; d="scan'208";a="107207565" Subject: Re: [Intel-gfx] [PATCH 3/3] Introduce & use new lightweight SGL iterators To: Chris Wilson References: <1463411944-13533-1-git-send-email-david.s.gordon@intel.com> <1463411944-13533-3-git-send-email-david.s.gordon@intel.com> <573AF3B6.3060403@linux.intel.com> <573B091C.5090505@intel.com> <20160519172752.GE3590@nuc-i3427.alporthouse.com> Cc: Tvrtko Ursulin , linux-kernel@vger.kernel.org From: Dave Gordon Organization: Intel Corporation (UK) Ltd. - Co. Reg. #1134945 - Pipers Way, Swindon SN3 1RJ Message-ID: <573E56AB.9040208@intel.com> Date: Fri, 20 May 2016 01:13:31 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <20160519172752.GE3590@nuc-i3427.alporthouse.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/05/2016 18:27, Chris Wilson wrote: > On Tue, May 17, 2016 at 01:05:48PM +0100, Dave Gordon wrote: >> On 17/05/16 11:34, Tvrtko Ursulin wrote: >>> On 16/05/16 16:19, Dave Gordon wrote: >>>> The existing for_each_sg_page() iterator is somewhat heavyweight, and is >>>> limiting i915 driver performance in a few benchmarks. So here we >>>> introduce somewhat lighter weight iterators, primarily for use with GEM >>>> objects or other case where we need only deal with whole aligned pages. >>> Interesting idea, if for nothing then for eliminating the dreaded >>> st->nents of for_each_sg_page. :) >>> >>> Which benchmarks it improves and how much do you know? >> I know nothing :) >> >> But last time I posted some easy-to-use iterators, Chris Wilson said >> they didn't address his complaint, which was that the existing ones >> were too slow. > These aren't very good either... Compared to the sg iters I have: > > gem:exec:fault:1MiB: -4.32% > gem:exec:fault:1MiB:forked: -5.66% > gem:exec:fault:16MiB: -13.33% > gem:exec:fault:16MiB:forked: -12.03% > gem:exec:fault:256MiB: -15.28% > gem:exec:fault:256MiB:forked: -16.98% > > (I was really hoping to be able to drop a patch!) I think you've inlined sg_next() as well? That was the next thing I was going to try with these ... I'll post the version with inline sg_next, but I'm on holiday now so won't be around until the end of the month. .Dave.