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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5168AC77B61 for ; Mon, 10 Apr 2023 09:00:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229937AbjDJJA2 (ORCPT ); Mon, 10 Apr 2023 05:00:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229803AbjDJJAJ (ORCPT ); Mon, 10 Apr 2023 05:00:09 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9BBC5277 for ; Mon, 10 Apr 2023 02:00:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681117203; x=1712653203; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=dqF2REshPEPcaWNr3EMg4H0fo/5f+H+KwIw4rUrhjRc=; b=Ed98++yZoNyzl1mjpY8nP6BW+2PWeTk0i32Jqc5Jseg32cAWrt5d3itV gWBf4QTorATadSsYxxhS7UFFwkYhaN0oH37L07jZFBMPaGhnAaA3Jn4Jl SEOw6xCjrnRVAB5m8u8mpbHPGtkm11j+5dFWAyd4nfax9r/A/J9gGojc7 9NTPVeTolGiB8uMsXCaXwFRdvs2IcL2A6RLHyDOL1fQtDx0Itn0cfBM0f dUvTjq0F1TnJycqXqcjfLVH9ZJ72WYqLK32iN5hzuFkPlkLfygR+Nrn3n Q+/qqYqeAp9R8dLnn1/nuvf6CR4z7jQEv+6UnpToqWPDI/nW6dNQDEmkG A==; X-IronPort-AV: E=McAfee;i="6600,9927,10675"; a="342081041" X-IronPort-AV: E=Sophos;i="5.98,333,1673942400"; d="scan'208";a="342081041" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Apr 2023 02:00:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10675"; a="688209076" X-IronPort-AV: E=Sophos;i="5.98,333,1673942400"; d="scan'208";a="688209076" Received: from liuzhao-optiplex-7080.sh.intel.com (HELO localhost) ([10.239.160.28]) by orsmga002.jf.intel.com with ESMTP; 10 Apr 2023 01:59:58 -0700 Date: Mon, 10 Apr 2023 17:08:45 +0800 From: Zhao Liu To: Thomas =?utf-8?B?SGVsbHN0cu+/vW0=?= , Matthew Auld , Tvrtko Ursulin Cc: Ira Weiny , "Fabio M. De Francesco" , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , Nirmoy Das , Maarten Lankhorst , Chris Wilson , Christian =?utf-8?B?S++/vW5pZw==?= , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Tvrtko Ursulin , Zhenyu Wang , Zhao Liu Subject: Re: [PATCH v2 9/9] drm/i915: Use kmap_local_page() in gem/i915_gem_execbuffer.c Message-ID: References: <20230329073220.3982460-1-zhao1.liu@linux.intel.com> <64265ef8725fe_375f7e294a@iweiny-mobl.notmuch> <2177327.1BCLMh4Saa@suse> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2177327.1BCLMh4Saa@suse> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks all for your review! On Fri, Mar 31, 2023 at 05:32:17PM +0200, Fabio M. De Francesco wrote: > Date: Fri, 31 Mar 2023 17:32:17 +0200 > From: "Fabio M. De Francesco" > Subject: Re: [PATCH v2 9/9] drm/i915: Use kmap_local_page() in > gem/i915_gem_execbuffer.c > > On venerd? 31 marzo 2023 13:30:20 CEST Tvrtko Ursulin wrote: > > On 31/03/2023 05:18, Ira Weiny wrote: > [snip] > > > However I am unsure if disabling pagefaulting is needed or not. Thomas, > > Matt, being the last to touch this area, perhaps you could have a look? > > Because I notice we have a fallback iomap path which still uses > > io_mapping_map_atomic_wc. So if kmap_atomic to kmap_local conversion is > > safe, does the iomap side also needs converting to > > io_mapping_map_local_wc? Or they have separate requirements? > > AFAIK, the requirements for io_mapping_map_local_wc() are the same as for > kmap_local_page(): the kernel virtual address is _only_ valid in the caller > context, and map/unmap nesting must be done in stack-based ordering (LIFO). > > I think a follow up patch could safely switch to io_mapping_map_local_wc() / > io_mapping_unmap_local_wc since the address is local to context. > > However, not being an expert, reading your note now I suspect that I'm missing > something. Can I ask why you think that page-faults disabling might be > necessary? About the disabling of pagefault here, could you please talk more about it? :-) >From previous discussions and commit history, I didn't find relevant information and I lack background knowledge about it... If we have the reason to diable pagefault, I will fix and refresh the new version. Thanks, Zhao > > Thanks, > > Fabio > > > Regards, > > > > Tvrtko > > >