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 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 7EACAC77B61 for ; Mon, 10 Apr 2023 09:00:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CBE5A10E2C3; Mon, 10 Apr 2023 09:00:06 +0000 (UTC) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id 34A7510E0C9; Mon, 10 Apr 2023 09:00:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681117204; x=1712653204; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=dqF2REshPEPcaWNr3EMg4H0fo/5f+H+KwIw4rUrhjRc=; b=fqPAh+neaqzPKOzmmazkroBh3uv+YNDZRaNKC4ElhDcPUOicKCILJ5MJ fT5UEco5uztKe6KwvXjxwg0ec4+it6KJ7ETeWt6O7shyFdq2VllgDEA4H Tb1MUxFtog0yGXGTHXFcZwxVrc0k4GJKYuddkGqpK92/97+JgnSpiWnjj jIrUGqK1vUHAIq0xPwC62zVlvZrMcxkgNnEpWyfDatROlJ/H/S5hZcpQh dxKSqcKDZQ9dBYgk1BXpsnpcJ/BGErH7f4jO0RsZ40CySwwi9tEAmwyG6 wWfU7P6DhJie76MTxFDzOxv6oIP/hKF9BH0mBqbdlggT2DZz9snnStlT0 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10675"; a="342081042" X-IronPort-AV: E=Sophos;i="5.98,333,1673942400"; d="scan'208";a="342081042" 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 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> Subject: Re: [Intel-gfx] [PATCH v2 9/9] drm/i915: Use kmap_local_page() in gem/i915_gem_execbuffer.c 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: , Cc: Zhenyu Wang , Ira Weiny , David Airlie , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, Chris Wilson , dri-devel@lists.freedesktop.org, Daniel Vetter , Rodrigo Vivi , "Fabio M. De Francesco" , Christian =?utf-8?B?S++/vW5pZw==?= , Zhao Liu , Nirmoy Das Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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 > > >