Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4693992ybg; Tue, 29 Oct 2019 11:00:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqwrp+cnV6Hf6Soj91NwVh9TL3Ks6KrhOywWA0GGqkQAaG462R4fX7D5w3gFK7pAVNwoj7iJ X-Received: by 2002:aa7:cd79:: with SMTP id ca25mr27550729edb.33.1572372037118; Tue, 29 Oct 2019 11:00:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572372037; cv=none; d=google.com; s=arc-20160816; b=ETfHkqdUKSh4q3uhOTUsW0wuAJn5ipzTaEKwXpWRkM57Q945k6LZGDwSzaPQAt5gLG XGiQ3FdLD7B5shdBquMKdksyokCUZFTxMcLiDtIq5OBHYKknHWnXPf62SxEVrw7IpYaa aX/034AtwDZTa7HNnW33G31C3U1pqJivF+yy2togs28+qF/6cXu/f7+1VFkcHdDs0Gnn 3u5JcaQ0i3mq0TshSV8zjK1zNksAl60QQDuqS8DSv0eYPwj2QOg0hMZkRkemNnuEg/1h 65QbDaJY5lmiRTv+NP5hPrC6QliR7Ozl50fsX+JRwPkopBzgHODn6tE6en9/PTo+seH7 oxNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=23MMDHIXZDeQue6zpbiMnZ6lKthTMo1S2fqSdftmDQo=; b=i18xPzpdBxPfgE/enQAwcDlDG/a5YEPqj+0ZwIV8RbCA3Njk/VXF261ixyqObSxkxI Y1AgB3xlDxm5FqLF9RVGlysgda1OP1SDtz9oJAhs3sDc/ALjU2NY/yT4s290hBh5Dsi1 BfcdEOrmv65P9hp0RxnX0WD6Xfa3LKA1fULgIIq6RRXdVEsKQ/8lyCNyrhMhboeU2/0O 67GZjm/WwhKYlA2UdJ+Jk3jsaENBAzxuDv8Zz4HGxq3/lyRwUxGqqunaLpa9R2CR+z6M ugtYHBJ83aLI4E7jR/GBMnn5us24XBro6gnAD2eMBxZ2LQMWdHLafAUVTKqWDIi1MEXv Ns2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GdaMUmmg; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e21si7520034ejb.147.2019.10.29.11.00.13; Tue, 29 Oct 2019 11:00:37 -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; dkim=pass header.i=@kernel.org header.s=default header.b=GdaMUmmg; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729442AbfJ2LQB (ORCPT + 99 others); Tue, 29 Oct 2019 07:16:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:55218 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725776AbfJ2LQB (ORCPT ); Tue, 29 Oct 2019 07:16:01 -0400 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 12913208E3; Tue, 29 Oct 2019 11:15:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572347760; bh=PYpYmLCcRCDnvoNd2S0sMHcaEM2JronWu9CsKftbO3I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GdaMUmmgMjWuXCjwK0dWZlcoWZbdkss1hf/IPKcAItun5DvAeYWYvYEXepIKuV8F4 Cgj6BmO5LCR5kVQSqH6TeJrA5sMtyubLtUhcJCViQ3HQZ9x8ffrdD48QttQIxJTdvs cKuoCU3Lo8JRJ8savTdPFUcs8+VjcCEB/d/GTobo= Date: Tue, 29 Oct 2019 11:15:56 +0000 From: Will Deacon To: Robin Murphy Cc: Rob Clark , Rob Clark , iommu@lists.linux-foundation.org, freedreno , Joerg Roedel , "moderated list:ARM SMMU DRIVERS" , open list Subject: Re: [PATCH v2] iommu/arm-smmu: fix "hang" when games exit Message-ID: <20191029111555.GF11590@willie-the-truck> References: <418d8426-f299-1269-2b2e-f86677cf22c2@arm.com> <20191007204906.19571-1-robdclark@gmail.com> <20191028222042.GB8532@willie-the-truck> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 28, 2019 at 10:51:53PM +0000, Robin Murphy wrote: > On 2019-10-28 10:38 pm, Rob Clark wrote: > > On Mon, Oct 28, 2019 at 3:20 PM Will Deacon wrote: > > > On Mon, Oct 07, 2019 at 01:49:06PM -0700, Rob Clark wrote: > > > > From: Rob Clark > > > > > > > > When games, browser, or anything using a lot of GPU buffers exits, there > > > > can be many hundreds or thousands of buffers to unmap and free. If the > > > > GPU is otherwise suspended, this can cause arm-smmu to resume/suspend > > > > for each buffer, resulting 5-10 seconds worth of reprogramming the > > > > context bank (arm_smmu_write_context_bank()/arm_smmu_write_s2cr()/etc). > > > > To the user it would appear that the system just locked up. > > > > > > > > A simple solution is to use pm_runtime_put_autosuspend() instead, so we > > > > don't immediately suspend the SMMU device. > > > > > > Please can you reword the subject to be a bit more useful? The commit > > > message is great, but the subject is a bit like "fix bug in code" to me. > > > > yeah, not the best $subject, but I wasn't quite sure how to fit > > something better in a reasonable # of chars.. maybe something like: > > "iommu/arm-smmu: optimize unmap but avoiding toggling runpm state"? > > FWIW, I'd be inclined to frame it as something like "avoid pathological RPM > behaviour for unmaps". LGTM! Will