Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id B051FC433EF for ; Tue, 19 Jul 2022 07:24:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9F8A610FAB2; Tue, 19 Jul 2022 07:24:47 +0000 (UTC) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8B24C10FA87; Tue, 19 Jul 2022 07:24:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658215486; x=1689751486; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=75p9fUuRHTBFN8wmS9uUr2gQdmoiH7o4N5Yd87DQGtA=; b=RX3meGFYye/8fmYZaeCNzKCs6BgLdheWZ+sLelsH/02EVoEfantHD2wY V2LVcsSKjM97+HJTU+yTJpeP6Utexw/1s6cNQYgS6EPTxEUI/LastsTDp O+JD0xdXIT3hqdfnotuCUpCXuV2lNWUpcPAAmT5ju7DiVM1UkmXpO0/Ma 1ez3okocF9XcYuDxf9EIPFCMb1NnNxRzWkhKS01U82JdO6pRhidQR1KBp eG8nU9HI/MYkUNG7s/MmW6KqvRQCf3YjSSeDA8U7J6A+nsUtONTBeaCy1 1GCuEUrrFBqmcWUjiK25eFviH+NRoQErHnZJbQNsN9BVo9B+bIOFA7hZP A==; X-IronPort-AV: E=McAfee;i="6400,9594,10412"; a="312104122" X-IronPort-AV: E=Sophos;i="5.92,283,1650956400"; d="scan'208";a="312104122" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jul 2022 00:24:46 -0700 X-IronPort-AV: E=Sophos;i="5.92,283,1650956400"; d="scan'208";a="601493430" Received: from ssherida-mobl.ger.corp.intel.com (HELO [10.213.201.170]) ([10.213.201.170]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jul 2022 00:24:41 -0700 Message-ID: <7ed6b275-e0d3-12b7-cdbe-c43994e92b47@linux.intel.com> Date: Tue, 19 Jul 2022 08:24:40 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [Intel-gfx] [PATCH v2 01/21] drm/i915/gt: Ignore TLB invalidations on idle engines Content-Language: en-US To: David Laight , 'Mauro Carvalho Chehab' References: <76318fe1-37dc-8a1e-317e-76333995b8ca@linux.intel.com> <20220718165341.30ee6e31@maurocar-mobl2> From: Tvrtko Ursulin Organization: Intel Corporation UK Plc In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed 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: , Cc: =?UTF-8?Q?Thomas_Hellstr=c3=b6m?= , David Airlie , "intel-gfx@lists.freedesktop.org" , Lucas De Marchi , "linux-kernel@vger.kernel.org" , Chris Wilson , "dri-devel@lists.freedesktop.org" , Rodrigo Vivi , Dave Airlie , "stable@vger.kernel.org" , Mauro Carvalho Chehab , Matthew Auld Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi David, On 18/07/2022 16:50, David Laight wrote: > From: Mauro Carvalho Chehab >> Sent: 18 July 2022 15:54 >> >> On Mon, 18 Jul 2022 14:16:10 +0100 >> Tvrtko Ursulin wrote: >> >>> On 14/07/2022 13:06, Mauro Carvalho Chehab wrote: >>>> From: Chris Wilson >>>> >>>> Check if the device is powered down prior to any engine activity, >>>> as, on such cases, all the TLBs were already invalidated, so an >>>> explicit TLB invalidation is not needed, thus reducing the >>>> performance regression impact due to it. >>>> >>>> This becomes more significant with GuC, as it can only do so when >>>> the connection to the GuC is awake. >>>> >>>> Cc: stable@vger.kernel.org >>>> Fixes: 7938d61591d3 ("drm/i915: Flush TLBs before releasing backing store") >>> >>> Patch itself looks fine but I don't think we closed on the issue of >>> stable/fixes on this patch? >> >> No, because TLB cache invalidation takes time and causes time outs, which >> in turn affects applications and produce Kernel warnings. > > It's not only the TLB flushes that cause grief. > > There is a loop that forces a write-back of all the frame buffer pages. > With a large display and some cpu (like my Ivy bridge one) that > takes long enough with pre-emption disabled that wakeup of RT processes > (and any pinned to the cpu) takes far longer than one might have > wished for. > > Since some X servers request a flush every few seconds this makes > the system unusable for some workloads. Ok TLB invalidations as discussed in this patch does not apply to Ivybridge. But what is the write back loop you mention which is causing you grief? What size frame buffers are we talking about here? If they don't fit in the mappable area recently we merged a patch* which improves things in that situation but not sure you are hitting exactly that. Regards, Tvrtko *) 230523ba24bd ("drm/i915/gem: Don't evict unmappable VMAs when pinning with PIN_MAPPABLE (v2)")