Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1986128yba; Fri, 17 May 2019 08:34:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqwPX4TuEVPHs5qwTBLqsicdurOb7/4otDPnIKJ1XReMB9ivbRcEaplV87IErZz5N9dAT+dg X-Received: by 2002:a62:86ce:: with SMTP id x197mr62053834pfd.218.1558107274301; Fri, 17 May 2019 08:34:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558107274; cv=none; d=google.com; s=arc-20160816; b=qi/9NC4F8kLWXliKSGc3rPIA4I2Y6cHKjjYOPlgtkwPmwD0Ip/Rr+c8abbcLUXcNEq b+O+Y0YocusXAStvnHXSHBiVUkss+9unGC+S1wX4OrWqW4UEJObG+uOywK9YE63roKyy hSK6W/HqSXNJ3Xel3DL/WsQmn6RyT/sgscKdWdFz6+NTyUI7GKHni3HhZzOPUNpUhSZg A/bSeVkmHFLH836e5F1TRzrCPoJZ3q8SEU3QDG8jJw4/Zc333gAZctUR0lJgMEscitzq TdHgBhai+s1IWjiXKcOpZBq6kt1puj4SMpK2s/qd5rdlbrLu9P6P0r5ALbQSF7WBwdD8 JM2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:user-agent:message-id :references:cc:in-reply-to:from:to:content-transfer-encoding :mime-version; bh=Y4H5XJk5r0SIaCl1vkk48DhdCgN/vwbCW936llIxj14=; b=vkrwC+9eDXx5aoRTOyUT6ywVSLE28sd4CuT2Q8U7oISO7g2rzXrdMbPi2VbxUogVpj e4esrxVWMrgt5gHlheozrm9fk1p+kCTSIQh7b8tkSHoOvE1kvo6TBLeQhoBqpGwJdApB 1QdQpR0a1LUPfNmFTVPdKJNG2yit1uEKlA9t0fK8p44Ln23lA3QyMuMD44eP0L3q0wry VXtihazFtWGrO9Jod2MVSsNrUm/MHO5QOwP8A4T5Hgp2o/7XDKlahXjYxXiiIQBcnDD9 qdxrukQ8UPHkgzsURlPIfFeepK0sGxWeyJOWql62GAhmw8OVSJuxn/J8a6MnEWTmgLJ2 fGPg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v71si8318986pgd.552.2019.05.17.08.34.18; Fri, 17 May 2019 08:34:34 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728924AbfEQOcu convert rfc822-to-8bit (ORCPT + 99 others); Fri, 17 May 2019 10:32:50 -0400 Received: from mail.fireflyinternet.com ([109.228.58.192]:63692 "EHLO fireflyinternet.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728887AbfEQOct (ORCPT ); Fri, 17 May 2019 10:32:49 -0400 X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from localhost (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP (TLS) id 16590567-1500050 for multiple; Fri, 17 May 2019 15:32:37 +0100 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT To: Janusz Krzysztofik , intel-gfx@lists.freedesktop.org From: Chris Wilson In-Reply-To: <20190517140617.31187-1-janusz.krzysztofik@linux.intel.com> Cc: Daniel Vetter , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Michal Wajdeczko , Janusz Krzysztofik References: <20190517140617.31187-1-janusz.krzysztofik@linux.intel.com> Message-ID: <155810355587.12244.1572259791791116662@skylake-alporthouse-com> User-Agent: alot/0.6 Subject: Re: [RFC PATCH] drm/i915: Tolerate file owned GEM contexts on hot unbind Date: Fri, 17 May 2019 15:32:35 +0100 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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