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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3CF5BC433F5 for ; Wed, 20 Oct 2021 15:12:33 +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 ED5FC6128B for ; Wed, 20 Oct 2021 15:12:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org ED5FC6128B 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 75D976E9C7; Wed, 20 Oct 2021 15:12:32 +0000 (UTC) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8101B6E9C7; Wed, 20 Oct 2021 15:12:31 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10143"; a="227571907" X-IronPort-AV: E=Sophos;i="5.87,167,1631602800"; d="scan'208";a="227571907" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2021 08:11:20 -0700 X-IronPort-AV: E=Sophos;i="5.87,167,1631602800"; d="scan'208";a="662277996" Received: from mmazarel-mobl1.ger.corp.intel.com (HELO [10.249.254.139]) ([10.249.254.139]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2021 08:11:18 -0700 Message-ID: <9ba70b49a41351ba711ead0212e2752f0db6c7fa.camel@linux.intel.com> From: Thomas =?ISO-8859-1?Q?Hellstr=F6m?= To: Matthew Auld , intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Date: Wed, 20 Oct 2021 17:11:16 +0200 In-Reply-To: <20211018174508.2137279-8-matthew.auld@intel.com> References: <20211018174508.2137279-1-matthew.auld@intel.com> <20211018174508.2137279-8-matthew.auld@intel.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.4 (3.40.4-1.fc34) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [Intel-gfx] [PATCH 8/9] drm/i915: mark up internal objects with start_cpu_write 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 Mon, 2021-10-18 at 18:45 +0100, Matthew Auld wrote: > While the pages can't be swapped out, they can be discarded by the > shrinker. > Normally such objects are marked with __I915_MADV_PURGED, which can't > be > unset, and therefore requires a new object. For kernel internal > objects > this is not true, since the madv hint is reset for our special > volatile > objects, such that we can re-acquire new pages, if so desired, > without > needing a new object. As a result we should probably be paranoid here > and put the object back into the CPU domain when discarding the > pages, > and also correctly set cache_dirty, if required. > > Signed-off-by: Matthew Auld > Cc: Thomas Hellström > --- >  drivers/gpu/drm/i915/gem/i915_gem_internal.c | 2 ++ >  1 file changed, 2 insertions(+) Reviewed-by: Thomas Hellström