Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp165979pxb; Wed, 25 Aug 2021 23:37:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTMpfkCOyNKvMFS1yBpXwILLr4l++M9K0aVSfy+8DKmJdcEihOTJXULn0Ut0qZDjR3TjN3 X-Received: by 2002:a05:6402:10d7:: with SMTP id p23mr2629211edu.74.1629959848243; Wed, 25 Aug 2021 23:37:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629959848; cv=none; d=google.com; s=arc-20160816; b=WCuDOzbEsSrMtJO1Vj2HKYBud+0VlsNt/QE8Cs4K9NWL4087wB84KRfm7VOIHrWe31 SNHkBwbZP9vWgyqJOwPe7WZTGSPD/DSWvE2YLE9HyT98dyRzzj4Kb2Q8IvVpgoFbux0H WqnLE4R1cCktUbuy25bJk8YZysfMK/eTCPSO7Jch2Oz4cOG38w/uBS0GCq3vtNRtXv+j maVity12c2StfDf57Zj6pdbTkUyArs3CDL52Rw3dZoX34WKgpnJmDjtcqTaCQnGfjZK7 r8dM2I/2zCEReN2fBsIP0cJW3x0nSugDVU3vPHO6yO9DgsSnINt23y/t8JFDxEBrVOlX 6NEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:reply-to:message-id:subject:cc:to:from:date; bh=3dJhDt+YH5CmxFK88x6qUxaP6VhmQ+HMeIuqmi9mKmw=; b=qiuMP4q1hCOmgYOscbiJD8JpavBL2E9Ncgm+v2wE+hP5foP/h8brcBJvE2+EJHrQsk CnhD5VF8vPdnbovAG2f00VIjco+om4k8+2XhrNkBG55bOqXKhKAe2VQZ6A8jJXvwwknP eCPt5cAKNJlP/g552RIvAGOcgIMP5ZxYmyl2GCEbMelFatESKZ78BoKKWwf/7Q1M56Sp 7jHngIm8iLnzDlA71JbWyDZieR3A5Efy0QgCR2dUr72rqCitKJfTJIEClMjRtqXlq8/q XMcA7LJqCDqbixFLsdC7WB0ZwX5qgYk+iwPefIGCX5D4O/j1t5EzOFYQ4iF+flpKVInI t+hA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i5si2076763edt.602.2021.08.25.23.37.02; Wed, 25 Aug 2021 23:37:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239177AbhHZGg3 (ORCPT + 99 others); Thu, 26 Aug 2021 02:36:29 -0400 Received: from mga06.intel.com ([134.134.136.31]:22551 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238082AbhHZGg3 (ORCPT ); Thu, 26 Aug 2021 02:36:29 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10087"; a="278689519" X-IronPort-AV: E=Sophos;i="5.84,352,1620716400"; d="asc'?scan'208";a="278689519" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2021 23:35:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,352,1620716400"; d="asc'?scan'208";a="527640870" Received: from zhen-hp.sh.intel.com (HELO zhen-hp) ([10.239.160.143]) by FMSMGA003.fm.intel.com with ESMTP; 25 Aug 2021 23:35:18 -0700 Date: Thu, 26 Aug 2021 14:12:19 +0800 From: Zhenyu Wang To: Luis Chamberlain Cc: Christoph Hellwig , Jason Gunthorpe , "dri-devel@lists.freedesktop.org" , Greg KH , "intel-gfx@lists.freedesktop.org" , Joonas Lahtinen , "linux-kernel@vger.kernel.org" , Jani Nikula , Gerd Hoffmann , "Vivi, Rodrigo" , "intel-gvt-dev@lists.freedesktop.org" , "Wang, Zhi A" , Jani Nikula Subject: Re: refactor the i915 GVT support Message-ID: <20210826061219.GD9942@zhen-hp.sh.intel.com> Reply-To: Zhenyu Wang References: <20210729072022.GB31896@lst.de> <20210803094315.GF13928@zhen-hp.sh.intel.com> <20210803143058.GA1721383@nvidia.com> <20210804052606.GG13928@zhen-hp.sh.intel.com> <20210816173458.GA9183@lst.de> <20210817010851.GW13928@zhen-hp.sh.intel.com> <20210817052203.GX13928@zhen-hp.sh.intel.com> <20210819082929.GB13928@zhen-hp.sh.intel.com> <20210820141724.GA29034@lst.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GZVR6ND4mMseVXL/" Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --GZVR6ND4mMseVXL/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2021.08.20 12:56:34 -0700, Luis Chamberlain wrote: > On Fri, Aug 20, 2021 at 04:17:24PM +0200, Christoph Hellwig wrote: > > On Thu, Aug 19, 2021 at 04:29:29PM +0800, Zhenyu Wang wrote: > > > I'm working on below patch to resolve this. But I met a weird issue in > > > case when building i915 as module and also kvmgt module, it caused > > > busy wait on request_module("kvmgt") when boot, it doesn't happen if > > > building i915 into kernel. I'm not sure what could be the reason? > >=20 > > Luis, do you know if there is a problem with a request_module from > > a driver ->probe routine that is probably called by a module_init > > function itself? >=20 > Generally no, but you can easily foot yourself in the feet by creating > cross dependencies and not dealing with them properly. I'd make sure > to keep module initialization as simple as possible, and run whatever > takes more time asynchronously, then use a state machine to allow > you to verify where you are in the initialization phase or query it > or wait for a completion with a timeout. >=20 > It seems the code in question is getting some spring cleaning, and its > unclear where the code is I can inspect. If there's a tree somewhere I > can take a peak I'd be happy to review possible oddities that may stick > out. I tried to put current patches under test here: https://github.com/intel/gv= t-linux/tree/gvt-staging The issue can be produced with CONFIG_DRM_I915=3Dm and CONFIG_DRM_I915_GVT_= KVMGT=3Dm. >=20 > My goto model for these sorts of problems is to abstract the issue > *outside* of the driver in question and implement new selftests to > try to reproduce. This serves two purposes, 1) helps with testing > 2) may allow you to see the problem more clearly. >=20 I'll see if can abstract that. Thanks, Luis. --GZVR6ND4mMseVXL/ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQTXuabgHDW6LPt9CICxBBozTXgYJwUCYScwwwAKCRCxBBozTXgY J4yKAJ0d9jcEa21+qw9af0hJvQT2LXk0WACggn/GD2G8nFh6SY4kc8+7qqXkpi0= =fIjO -----END PGP SIGNATURE----- --GZVR6ND4mMseVXL/--