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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E255C4743C for ; Mon, 21 Jun 2021 13:58:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F025C61042 for ; Mon, 21 Jun 2021 13:58:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229837AbhFUOAW (ORCPT ); Mon, 21 Jun 2021 10:00:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229736AbhFUOAV (ORCPT ); Mon, 21 Jun 2021 10:00:21 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94152C061574 for ; Mon, 21 Jun 2021 06:58:07 -0700 (PDT) Received: from maud (unknown [IPv6:2600:8800:8c04:8c00::912b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: alyssa) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id E9D631F422F0; Mon, 21 Jun 2021 14:58:02 +0100 (BST) Date: Mon, 21 Jun 2021 09:57:55 -0400 From: Alyssa Rosenzweig To: Boris Brezillon Cc: Rob Herring , Tomeu Vizoso , Alyssa Rosenzweig , Steven Price , Robin Murphy , dri-devel@lists.freedesktop.org, Icecream95 , stable@vger.kernel.org Subject: Re: [PATCH v2 01/12] drm/panfrost: Make sure MMU context lifetime is not bound to panfrost_priv Message-ID: References: <20210621133907.1683899-1-boris.brezillon@collabora.com> <20210621133907.1683899-2-boris.brezillon@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210621133907.1683899-2-boris.brezillon@collabora.com> Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org > Jobs can be in-flight when the file descriptor is closed (either because > the process did not terminate properly, or because it didn't wait for > all GPU jobs to be finished), and apparently panfrost_job_close() does > not cancel already running jobs. Let's refcount the MMU context object > so it's lifetime is no longer bound to the FD lifetime and running jobs > can finish properly without generating spurious page faults. Remind me - why can't we hard stop in-flight jobs when the fd is closed? I've seen cases where kill -9'ing a badly behaved process doesn't end the fault storm, or unfreeze the desktop. 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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ABC09C48BE5 for ; Mon, 21 Jun 2021 13:58:09 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 7091060232 for ; Mon, 21 Jun 2021 13:58:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7091060232 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=collabora.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EC4846E167; Mon, 21 Jun 2021 13:58:08 +0000 (UTC) Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by gabe.freedesktop.org (Postfix) with ESMTPS id A00636E17F for ; Mon, 21 Jun 2021 13:58:07 +0000 (UTC) Received: from maud (unknown [IPv6:2600:8800:8c04:8c00::912b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: alyssa) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id E9D631F422F0; Mon, 21 Jun 2021 14:58:02 +0100 (BST) Date: Mon, 21 Jun 2021 09:57:55 -0400 From: Alyssa Rosenzweig To: Boris Brezillon Subject: Re: [PATCH v2 01/12] drm/panfrost: Make sure MMU context lifetime is not bound to panfrost_priv Message-ID: References: <20210621133907.1683899-1-boris.brezillon@collabora.com> <20210621133907.1683899-2-boris.brezillon@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210621133907.1683899-2-boris.brezillon@collabora.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Icecream95 , Tomeu Vizoso , dri-devel@lists.freedesktop.org, Steven Price , Rob Herring , Alyssa Rosenzweig , stable@vger.kernel.org, Robin Murphy Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" > Jobs can be in-flight when the file descriptor is closed (either because > the process did not terminate properly, or because it didn't wait for > all GPU jobs to be finished), and apparently panfrost_job_close() does > not cancel already running jobs. Let's refcount the MMU context object > so it's lifetime is no longer bound to the FD lifetime and running jobs > can finish properly without generating spurious page faults. Remind me - why can't we hard stop in-flight jobs when the fd is closed? I've seen cases where kill -9'ing a badly behaved process doesn't end the fault storm, or unfreeze the desktop.