Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4714459ybb; Tue, 7 Apr 2020 12:58:48 -0700 (PDT) X-Google-Smtp-Source: APiQypJgTpcVaSDRjQh26jd8dwv155Q0Jg5WIi2kj4JvCbfunrs7rUDCjAauBLVB+U5qqtBVRKMT X-Received: by 2002:aca:5d87:: with SMTP id r129mr408942oib.144.1586289528760; Tue, 07 Apr 2020 12:58:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586289528; cv=none; d=google.com; s=arc-20160816; b=Av5/54xPokzddhveWp5GJHufEm62SSVUu8A6EdTxQaDq4LNUFimEjHyJMDvv+9TVm2 x8lB589FvPBKN049jRYBSav+pZFlbBzyCZS6hFWau7B6wTiQ4zUdkpBcuRTVZfs9Weoz 95W8N5AGAQhXm06JfJYmLRxhO1aMiD5qSp6MFWtebv+aRp+WB01RAkb6E0A9v74wn4Xy B+XSeB2U7p3RtyvWRWqqzTNyalQuWDH4kXA+2xxNYMxBJQWb3HhMPPjTvMP0Luo1x6fC OnykWWIeZ2J2CvJT91/05xFzm8EQvj8G1AT/3UlwRyH2cO9IYb/zGOXT+3JraX9y2ZMV Dzvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :dkim-signature; bh=6oL/unPOm84eViMmE74yyFVNJMihy+VyIHt3KRhfSQc=; b=Wt56XsvaCzIyXLqARB9pXT1abPLxFjVU/vEcH6LP9k9Gk5fnwobYr6uzeg2cgFL4IT UfoNhD6/xCch2Pu92vh1ft3DsVpINKqsyCej57PO/z3jSaSUs42DU9o00tUQfXlasLKS jlxJTDyVCWIJawNRTxmIm5nVj6We02zvpp2dDfNJmb/vAGNb0myflqc13Awad1w5onBc dj5C+SL4yjjebf6t4FF/yTAU/5VUK80vlf5uRd0DpdurnP4VOrQVF6NSMxMQjdSStYsS /bk18aEIE5ALMJSRPgEFtW0qt1l3Lp0UWy9Pj/0M7/BSclIcmHRTczOeGHTG5Qaejxx7 IsEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@shipmail.org header.s=mail header.b=ADF7+uVu; 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 u3si1570642otq.177.2020.04.07.12.58.34; Tue, 07 Apr 2020 12:58:48 -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=fail (test mode) header.i=@shipmail.org header.s=mail header.b=ADF7+uVu; 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 S1727387AbgDGT5q (ORCPT + 99 others); Tue, 7 Apr 2020 15:57:46 -0400 Received: from ste-pvt-msa2.bahnhof.se ([213.80.101.71]:18696 "EHLO ste-pvt-msa2.bahnhof.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726712AbgDGT5p (ORCPT ); Tue, 7 Apr 2020 15:57:45 -0400 Received: from localhost (localhost [127.0.0.1]) by ste-pvt-msa2.bahnhof.se (Postfix) with ESMTP id A6DCF3F423; Tue, 7 Apr 2020 21:57:42 +0200 (CEST) Authentication-Results: ste-pvt-msa2.bahnhof.se; dkim=pass (1024-bit key; unprotected) header.d=shipmail.org header.i=@shipmail.org header.b=ADF7+uVu; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at bahnhof.se X-Spam-Flag: NO X-Spam-Score: -2.099 X-Spam-Level: X-Spam-Status: No, score=-2.099 tagged_above=-999 required=6.31 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no Authentication-Results: ste-ftg-msa2.bahnhof.se (amavisd-new); dkim=pass (1024-bit key) header.d=shipmail.org Received: from ste-pvt-msa2.bahnhof.se ([127.0.0.1]) by localhost (ste-ftg-msa2.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id juSonQZZkhfi; Tue, 7 Apr 2020 21:57:41 +0200 (CEST) Received: from mail1.shipmail.org (h-205-35.A357.priv.bahnhof.se [155.4.205.35]) (Authenticated sender: mb878879) by ste-pvt-msa2.bahnhof.se (Postfix) with ESMTPA id CBCE53F3F1; Tue, 7 Apr 2020 21:57:32 +0200 (CEST) Received: from localhost.localdomain (h-205-35.A357.priv.bahnhof.se [155.4.205.35]) by mail1.shipmail.org (Postfix) with ESMTPSA id 8FBC3360153; Tue, 7 Apr 2020 21:57:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=shipmail.org; s=mail; t=1586289452; bh=n8v3kP19wHdlpasfsqLzlqOfhDoVJzv2qXSEHg2XIUw=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=ADF7+uVugZlqdmK5afrGpG3q5imNSOSM3I40tdQMKpNd14xTelmYZ5CMsLyPXrfjN +XMf3b9C+ML4rnbmUkQ1nhVWV7VdVyHblKCmHYuUSFCagT/uOB+wwSM1N+yrpoCcQL wuCcY4doZST4CAMHbIY+PSnC6wwUdMVLMkIrRL/U= Subject: Re: Bad rss-counter state from drm/ttm, drm/vmwgfx: Support huge TTM pagefaults To: "Alex Xu (Hello71)" , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: Andrew Morton , =?UTF-8?Q?Christian_K=c3=b6nig?= , Dan Williams , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , "Kirill A. Shutemov" , linux-graphics-maintainer@vmware.com, Michal Hocko , pv-drivers@vmware.com, Ralph Campbell , Roland Scheidegger , "Matthew Wilcox (Oracle)" References: <1586138158.v5u7myprlp.none.ref@localhost> <1586138158.v5u7myprlp.none@localhost> <0b12b28c-5f42-b56b-ea79-6e3d1052b332@shipmail.org> <1586219716.1a3fyi6lh5.none@localhost> <37624a1f-8e6b-fe9c-8e0e-a9139e1bbe18@shipmail.org> <1586273767.0q72rozj3x.none@localhost> From: =?UTF-8?Q?Thomas_Hellstr=c3=b6m_=28VMware=29?= Organization: VMware Inc. Message-ID: Date: Tue, 7 Apr 2020 21:57:27 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <1586273767.0q72rozj3x.none@localhost> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/7/20 5:36 PM, Alex Xu (Hello71) wrote: > Excerpts from Thomas Hellström (VMware)'s message of April 7, 2020 7:26 am: >> On 4/7/20 2:38 AM, Alex Xu (Hello71) wrote: >>> Excerpts from Thomas Hellström (VMware)'s message of April 6, 2020 5:04 pm: >>>> Hi, >>>> >>>> On 4/6/20 9:51 PM, Alex Xu (Hello71) wrote: >>>>> Using 314b658 with amdgpu, starting sway and firefox causes "BUG: Bad >>>>> rss-counter state" and "BUG: non-zero pgtables_bytes on freeing mm" to >>>>> start filling dmesg, and then closing programs causes more BUGs and >>>>> hangs, and then everything grinds to a halt (can't start more programs, >>>>> can't even reboot through systemd). >>>>> >>>>> Using master and reverting that branch up to that point fixes the >>>>> problem. >>>>> >>>>> I'm using a Ryzen 1600 and AMD Radeon RX 480 on an ASRock B450 Pro4 >>>>> board with IOMMU enabled. >>>> If you could try the attached patch, that'd be great! >>>> >>>> Thanks, >>>> >>>> Thomas >>>> >>> Yeah, that works too. Kernel config sent off-list. >>> >>> Regards, >>> Alex. >> Thanks. Do you want me to add your >> >> Reported-by: and Tested-by: To this patch? >> >> /Thomas >> >> > Sure. Shouldn't we fix it properly though? It's still enabled for vmwgfx for which it is reasonably well tested and where I can't see any such errors. The code we remove with this patch enables huge page-table entries in some circumstances for other drivers, but given the problems you're seeing for amdgpu, it's better to enable this on a per-driver basis after thorough testing. Since I don't have amdgpu hardware I'm not sure what it's doing differently, and can't debug the issue properly. /Thomas