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=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,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 AAD69C48BDF for ; Tue, 15 Jun 2021 14:45:18 +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 620E161494 for ; Tue, 15 Jun 2021 14:45:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 620E161494 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5FCE86E328; Tue, 15 Jun 2021 14:45:16 +0000 (UTC) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1D7A589FBC; Tue, 15 Jun 2021 14:45:15 +0000 (UTC) IronPort-SDR: PX4xQA0S/SI/SKryiWODDEszpaKeHnEH2bhkNRwjF4Kn/zaJvCh2b+utvkwHRwIkR+IXV8a6Io AC34b8x0HXXA== X-IronPort-AV: E=McAfee;i="6200,9189,10015"; a="291634863" X-IronPort-AV: E=Sophos;i="5.83,275,1616482800"; d="scan'208";a="291634863" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jun 2021 07:45:13 -0700 IronPort-SDR: KhJG8PAt/x2XOA4OLoeTuDEWjZ6cC+zrxgSc0e1YUhdcSiOinRmdILQm0a/wK8rVr3ruqH1UNg pla+Vp8u11nQ== X-IronPort-AV: E=Sophos;i="5.83,275,1616482800"; d="scan'208";a="451989432" Received: from vlernihx-mobl3.ger.corp.intel.com (HELO [10.252.12.108]) ([10.252.12.108]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jun 2021 07:45:12 -0700 Subject: Re: [PATCH v3 07/12] drm/i915/gt: Pipelined page migration To: =?UTF-8?Q?Thomas_Hellstr=c3=b6m?= , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org References: <20210614162612.294869-1-thomas.hellstrom@linux.intel.com> <20210614162612.294869-8-thomas.hellstrom@linux.intel.com> From: Matthew Auld Message-ID: Date: Tue, 15 Jun 2021 15:45:10 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210614162612.294869-8-thomas.hellstrom@linux.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit 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: Chris Wilson Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 14/06/2021 17:26, Thomas Hellström wrote: > From: Chris Wilson > > If we pipeline the PTE updates and then do the copy of those pages > within a single unpreemptible command packet, we can submit the copies > and leave them to be scheduled without having to synchronously wait > under a global lock. In order to manage migration, we need to > preallocate the page tables (and keep them pinned and available for use > at any time), causing a bottleneck for migrations as all clients must > contend on the limited resources. By inlining the ppGTT updates and > performing the blit atomically, each client only owns the PTE while in > use, and so we can reschedule individual operations however we see fit. > And most importantly, we do not need to take a global lock on the shared > vm, and wait until the operation is complete before releasing the lock > for others to claim the PTE for themselves. > > Signed-off-by: Chris Wilson > Co-developed-by: Thomas Hellström > Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld