From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.6 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,HK_RANDOM_FROM,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A7568C433EF for ; Tue, 7 Sep 2021 09:34:26 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4C50E610FE for ; Tue, 7 Sep 2021 09:34:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4C50E610FE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 38C0F89F07; Tue, 7 Sep 2021 09:34:23 +0000 (UTC) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by gabe.freedesktop.org (Postfix) with ESMTPS id D8E0889ED6; Tue, 7 Sep 2021 09:34:21 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10099"; a="199679004" X-IronPort-AV: E=Sophos;i="5.85,274,1624345200"; d="scan'208";a="199679004" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2021 02:34:21 -0700 X-IronPort-AV: E=Sophos;i="5.85,274,1624345200"; d="scan'208";a="502905529" Received: from ikcrook-mobl.amr.corp.intel.com (HELO [10.213.197.103]) ([10.213.197.103]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2021 02:34:19 -0700 Subject: Re: [PATCH 2/2] drm/i915: Use Transparent Hugepages when IOMMU is enabled To: Daniel Vetter Cc: intel-gfx , dri-devel , Tvrtko Ursulin , Chris Wilson , Joonas Lahtinen , Matthew Auld , Eero Tamminen , Rodrigo Vivi References: <20210729133420.770672-1-tvrtko.ursulin@linux.intel.com> <20210729133420.770672-2-tvrtko.ursulin@linux.intel.com> From: Tvrtko Ursulin Organization: Intel Corporation UK Plc Message-ID: Date: Tue, 7 Sep 2021 10:34:17 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 07/09/2021 09:42, Daniel Vetter wrote: > On Fri, Sep 03, 2021 at 01:47:52PM +0100, Tvrtko Ursulin wrote: >> >> On 29/07/2021 15:06, Daniel Vetter wrote: >>> On Thu, Jul 29, 2021 at 3:34 PM Tvrtko Ursulin >>> wrote: >>>> >>>> From: Tvrtko Ursulin >>>> >>>> Usage of Transparent Hugepages was disabled in 9987da4b5dcf >>>> ("drm/i915: Disable THP until we have a GPU read BW W/A"), but since it >>>> appears majority of performance regressions reported with an enabled IOMMU >>>> can be almost eliminated by turning them on, lets just do that. >>>> >>>> To err on the side of safety we keep the current default in cases where >>>> IOMMU is not active, and only when it is default to the "huge=within_size" >>>> mode. Although there probably would be wins to enable them throughout, >>>> more extensive testing across benchmarks and platforms would need to be >>>> done. >>>> >>>> With the patch and IOMMU enabled my local testing on a small Skylake part >>>> shows OglVSTangent regression being reduced from ~14% (IOMMU on versus >>>> IOMMU off) to ~2% (same comparison but with THP on). >>>> >>>> v2: >>>> * Add Kconfig dependency to transparent hugepages and some help text. >>>> * Move to helper for easier handling of kernel build options. >>>> >>>> v3: >>>> * Drop Kconfig. (Daniel) >>>> >>>> References: b901bb89324a ("drm/i915/gemfs: enable THP") >>>> References: 9987da4b5dcf ("drm/i915: Disable THP until we have a GPU read BW W/A") >>>> References: https://gitlab.freedesktop.org/drm/intel/-/issues/430 >>>> Co-developed-by: Chris Wilson >>>> Signed-off-by: Chris Wilson >>>> Cc: Joonas Lahtinen >>>> Cc: Matthew Auld >>>> Cc: Eero Tamminen >>>> Cc: Tvrtko Ursulin >>>> Cc: Rodrigo Vivi >>>> Cc: Daniel Vetter >>>> Signed-off-by: Tvrtko Ursulin >>>> Reviewed-by: Rodrigo Vivi # v1 >>> >>> On both patches: Acked-by: Daniel Vetter >> >> Eero's testing results at >> https://gitlab.freedesktop.org/drm/intel/-/issues/430 are looking good - >> seem to show this to be a net win for at least Gen9 and Gen12 platforms. >> >> Is the ack enough to merge in this case or I should look for an r-b as well? > > Since your back to defacto v1 with the 2nd patch I think you have full r-b > already. So more than enough I think. Just in case you missed it, v1 had Kconfig. But it's the same spirit so probably indeed fine as you say. > Please do record the relative perf numbers from Eero in that issue in the > commit message so that we have that on the git log record too. It's easier > to find there than following the link and finding the right comment in the > issue. Will do. Regards, Tvrtko From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.6 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,HK_RANDOM_FROM,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A643FC433EF for ; Tue, 7 Sep 2021 09:34:23 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 64FB1610F8 for ; Tue, 7 Sep 2021 09:34:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 64FB1610F8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DC61489F03; Tue, 7 Sep 2021 09:34:22 +0000 (UTC) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by gabe.freedesktop.org (Postfix) with ESMTPS id D8E0889ED6; Tue, 7 Sep 2021 09:34:21 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10099"; a="199679004" X-IronPort-AV: E=Sophos;i="5.85,274,1624345200"; d="scan'208";a="199679004" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2021 02:34:21 -0700 X-IronPort-AV: E=Sophos;i="5.85,274,1624345200"; d="scan'208";a="502905529" Received: from ikcrook-mobl.amr.corp.intel.com (HELO [10.213.197.103]) ([10.213.197.103]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2021 02:34:19 -0700 To: Daniel Vetter Cc: intel-gfx , dri-devel , Tvrtko Ursulin , Chris Wilson , Joonas Lahtinen , Matthew Auld , Eero Tamminen , Rodrigo Vivi References: <20210729133420.770672-1-tvrtko.ursulin@linux.intel.com> <20210729133420.770672-2-tvrtko.ursulin@linux.intel.com> From: Tvrtko Ursulin Organization: Intel Corporation UK Plc Message-ID: Date: Tue, 7 Sep 2021 10:34:17 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Intel-gfx] [PATCH 2/2] drm/i915: Use Transparent Hugepages when IOMMU is enabled X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On 07/09/2021 09:42, Daniel Vetter wrote: > On Fri, Sep 03, 2021 at 01:47:52PM +0100, Tvrtko Ursulin wrote: >> >> On 29/07/2021 15:06, Daniel Vetter wrote: >>> On Thu, Jul 29, 2021 at 3:34 PM Tvrtko Ursulin >>> wrote: >>>> >>>> From: Tvrtko Ursulin >>>> >>>> Usage of Transparent Hugepages was disabled in 9987da4b5dcf >>>> ("drm/i915: Disable THP until we have a GPU read BW W/A"), but since it >>>> appears majority of performance regressions reported with an enabled IOMMU >>>> can be almost eliminated by turning them on, lets just do that. >>>> >>>> To err on the side of safety we keep the current default in cases where >>>> IOMMU is not active, and only when it is default to the "huge=within_size" >>>> mode. Although there probably would be wins to enable them throughout, >>>> more extensive testing across benchmarks and platforms would need to be >>>> done. >>>> >>>> With the patch and IOMMU enabled my local testing on a small Skylake part >>>> shows OglVSTangent regression being reduced from ~14% (IOMMU on versus >>>> IOMMU off) to ~2% (same comparison but with THP on). >>>> >>>> v2: >>>> * Add Kconfig dependency to transparent hugepages and some help text. >>>> * Move to helper for easier handling of kernel build options. >>>> >>>> v3: >>>> * Drop Kconfig. (Daniel) >>>> >>>> References: b901bb89324a ("drm/i915/gemfs: enable THP") >>>> References: 9987da4b5dcf ("drm/i915: Disable THP until we have a GPU read BW W/A") >>>> References: https://gitlab.freedesktop.org/drm/intel/-/issues/430 >>>> Co-developed-by: Chris Wilson >>>> Signed-off-by: Chris Wilson >>>> Cc: Joonas Lahtinen >>>> Cc: Matthew Auld >>>> Cc: Eero Tamminen >>>> Cc: Tvrtko Ursulin >>>> Cc: Rodrigo Vivi >>>> Cc: Daniel Vetter >>>> Signed-off-by: Tvrtko Ursulin >>>> Reviewed-by: Rodrigo Vivi # v1 >>> >>> On both patches: Acked-by: Daniel Vetter >> >> Eero's testing results at >> https://gitlab.freedesktop.org/drm/intel/-/issues/430 are looking good - >> seem to show this to be a net win for at least Gen9 and Gen12 platforms. >> >> Is the ack enough to merge in this case or I should look for an r-b as well? > > Since your back to defacto v1 with the 2nd patch I think you have full r-b > already. So more than enough I think. Just in case you missed it, v1 had Kconfig. But it's the same spirit so probably indeed fine as you say. > Please do record the relative perf numbers from Eero in that issue in the > commit message so that we have that on the git log record too. It's easier > to find there than following the link and finding the right comment in the > issue. Will do. Regards, Tvrtko