Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp215456yba; Mon, 20 May 2019 07:32:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqy1Vj/LmWD+bsUSPO4J5GMoMnaObgawOrsC7DUM1J65NSsenSywlByEUIz8jDzy1LXwp4LY X-Received: by 2002:a17:902:9a9:: with SMTP id 38mr32696677pln.10.1558362766569; Mon, 20 May 2019 07:32:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558362766; cv=none; d=google.com; s=arc-20160816; b=sPzB29g5VZ/W3dfcyQcup4RdbWCbs1o/usWvpQ3Gw/z9b4LkM1nJ4WkZihBVKDecCi 3so1YEvaKIduSJtErvsl9Q/IyX9CoIhlpc79RHPFWnrgfy/mNlKddXoxAmcmLcbgsvYm iHTop8t0h2LrPXhkTMrcd1UbDThg++F990hdB/Ezcbt672aisqMg+iuDalTSkDB4aYkc 65gHsL0W+85DOCsHTgvOkcy8FlaXAr6z9vV6mUNxflZkXiiUmaBx27eNcXH8cMysHGe3 A+S/6C84u1l6ySsHdS2yqLDzDy/DTZ783WUvm3Ty8eq0UQKVt+rvSDDri6e+sflUJzV3 bETg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:organization:message-id:date:subject:cc:to :from; bh=JKCiin1m65wxvKodEUQuOx5SBiovRZYnEcdUmHJZE4c=; b=HJBPqnrpzPNj/0E5WCLQmjotNEc7ajYFAfVN/Q7INUxltZ00GnpPOSaF7t7RdqWLTj z9rFQmGHq4It/6ed1HnCj1hCFSb1xp90XzsGA/kRn2FTmM4tPAqKEx8w3WneTDjuIB/O JBkJYgHEs0HHsJx6sr55utVe25Doat619WFW2DqEfeAEr0EtFSBe+N7NjywbqIQjkFwo ke2yMZnIWrFd8ZjfO51GDf15eBJDZ/aceGp1/FAH1cHa9OzUujiI+s1VDbXVNp/C9xP8 d5XAQ90OVosovFdfsDzGU2UERv9izbyNfqHIqoXX5iMpxsWz5DGizZ0+SZAUCv9RRlMl cdBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id d15si19072636plj.91.2019.05.20.07.32.22; Mon, 20 May 2019 07:32:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1730566AbfETK6d (ORCPT + 99 others); Mon, 20 May 2019 06:58:33 -0400 Received: from mga01.intel.com ([192.55.52.88]:55257 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726126AbfETK6d (ORCPT ); Mon, 20 May 2019 06:58:33 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 May 2019 03:58:32 -0700 Received: from jkrzyszt-desk.ger.corp.intel.com ([172.22.244.18]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 May 2019 03:58:30 -0700 From: Janusz Krzysztofik To: Chris Wilson Cc: intel-gfx@lists.freedesktop.org, Daniel Vetter , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Michal Wajdeczko Subject: Re: [RFC PATCH] drm/i915: Tolerate file owned GEM contexts on hot unbind Date: Mon, 20 May 2019 12:58:21 +0200 Message-ID: <1818300.2E6qEfYBKl@jkrzyszt-desk.ger.corp.intel.com> Organization: Intel Technology Poland sp. z o.o. - ul. Slowackiego 173, 80-298 Gdansk - KRS 101882 - NIP 957-07-52-316 In-Reply-To: <155810355587.12244.1572259791791116662@skylake-alporthouse-com> References: <20190517140617.31187-1-janusz.krzysztofik@linux.intel.com> <155810355587.12244.1572259791791116662@skylake-alporthouse-com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday, May 17, 2019 4:32:35 PM CEST Chris Wilson wrote: > Quoting Janusz Krzysztofik (2019-05-17 15:06:17) > > From: Janusz Krzysztofik > > > > During i915_driver_unload(), GEM contexts are verified restrictively > > inside i915_gem_fini() if they don't consume shared resources which > > should be cleaned up before the driver is released. If those checks > > don't result in kernel panic, one more check is performed at the end of > > i915_gem_fini() which issues a WARN_ON() if GEM contexts still exist. > > Just fix the underlying bug of this code being called too early. The > assumptions we made for unload are clearly invalid when applied to > unbind, and we need to split the phases. > -Chris Thanks Chris, I think I get it finally. Janusz