Received: by 10.192.165.148 with SMTP id m20csp2501595imm; Sun, 29 Apr 2018 00:05:27 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq3VpcTUgSvRNdD3V1TUyJnmJMh+YphGSP2MhJqe9zGwUXVTuXBGwYzdCRftHq0xJYi0wRP X-Received: by 2002:a17:902:7601:: with SMTP id k1-v6mr8184811pll.1.1524985527186; Sun, 29 Apr 2018 00:05:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524985527; cv=none; d=google.com; s=arc-20160816; b=g+l4DEIE24L5Fzhww6E1yfx4PwE4piWVdJ9f90TZ3uCq4Naolf2W3ICOWLzf+hAdHZ sQQHbbjgl35rBr+CNUWOJxSmqqApflyUHByom8DUirOGEiLZVZYF58CogmmczuMrvumy xPpRfqG4iSa0NcJSVq39gJyN74m14rmQaZJrD4nzjZX8Z9Ny4yjf/VsjqbupJ2Luc455 mYicPDxMugqaZBHkUvst1XVXSJZMBEAP/Nzq0rEbeqDNzaFo0st7iwG48stZT6hGhcv2 MSXq/85ZGRaCVDxsbUaI0i2Q7kulxDvbCvPE2Rp8XLy6W+EiZR7Qv72VFVnv+y0MKRWt WrPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:arc-authentication-results; bh=dvSfPSXgi9w8EkI4fAKi9EAaWaayY2QLpYmyavFqcI4=; b=Yoc3U8cqhzkHIk6SMeHOCqxVyP5ct2owTTxKZWsjVMktve8ZcoI7wseysxeWzL2VYh 2I0RYeVXEyDPMBLzwg1wEWOck1mxy1Am21nIugbrpBtZ0dvJMHoIOl/7ZQHmQd7+MuA3 LAp5/rsm/q9qhKX3XjEdYeZOhWQAxBZOOltp3hjWs4O1Ifqd71Ejyz08BayUqB7gYlfw VI/xN1xKYzvYSyOPRRURVn/+fGijsKd+SrF+QFII5VX02UMGyUJngngbsd6ZuwyDzzgI m9S8iku8pEyzI++61MTZfKg91WnCF2FoDKWahkMLEWjtMk7VAaUVBiROnhnaxZizFJd3 6Gmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=hytDU4te; 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 v184-v6si4423462pgd.82.2018.04.29.00.04.50; Sun, 29 Apr 2018 00:05:27 -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=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=hytDU4te; 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 S1752595AbeD2HDC (ORCPT + 99 others); Sun, 29 Apr 2018 03:03:02 -0400 Received: from mail-by2nam01on0084.outbound.protection.outlook.com ([104.47.34.84]:21728 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752128AbeD2HDA (ORCPT ); Sun, 29 Apr 2018 03:03:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=dvSfPSXgi9w8EkI4fAKi9EAaWaayY2QLpYmyavFqcI4=; b=hytDU4teCLeR70+thr+zO+MprX5OOEwlcaD+/3Az9gzbcmwaLo3jxRb9IVWpHyhbrCSksFnUVzUWCh1wKDa4wtlDf2S11uTz6hpQVyLn7Slt36wArLWfUvjwShQ+z3Y5tKtdnCB6knuXy7Gd/AZvizMqq9Xm6YOSvl6R5YmUjmc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Christian.Koenig@amd.com; Received: from [IPv6:2a02:908:1257:4460:1ab8:55c1:a639:6740] (2a02:908:1257:4460:1ab8:55c1:a639:6740) by BN6PR12MB1713.namprd12.prod.outlook.com (2603:10b6:404:106::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.715.18; Sun, 29 Apr 2018 07:02:55 +0000 Subject: Re: [PATCH v2 1/2] drm/ttm: Only allocate huge pages with new flag TTM_PAGE_FLAG_TRANSHUGE To: =?UTF-8?Q?Michel_D=c3=a4nzer?= , Ilia Mirkin Cc: dri-devel , amd-gfx mailing list , LKML References: <20180426150618.13470-1-michel@daenzer.net> <20180427130811.7642-1-michel@daenzer.net> From: =?UTF-8?Q?Christian_K=c3=b6nig?= Message-ID: Date: Sun, 29 Apr 2018 09:02:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [2a02:908:1257:4460:1ab8:55c1:a639:6740] X-ClientProxiedBy: HE1PR06CA0129.eurprd06.prod.outlook.com (2603:10a6:7:16::16) To BN6PR12MB1713.namprd12.prod.outlook.com (2603:10b6:404:106::10) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(48565401081)(2017052603328)(7153060)(7193020);SRVR:BN6PR12MB1713; X-Microsoft-Exchange-Diagnostics: 1;BN6PR12MB1713;3:czi7p15sE3WP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0jZJ6uAMuM2ZW+9UBGtnU1TY7g/uUhZUwq1o2vK9PcBRz7gtQ2bJXSm4pWnQXv1z55jghCR6nNMg1W/Ks0/z+Ej2ZBW2Pvync6z59ktoOYg6rx9ki5bzQXFXQXwnWxrzEG/QK1Wt4WYCrDW4PWsomZgGlph6kgltFXmU2lkdKSlGa067jy/riBGxyj2jW34BJBLF5w+r8PkRxTKYBedvy3AfAPE7wJpFu6jnAKxWgbeXfdplTSXAmrhEGTl+ehmblDIq/M9gBGskJMPA1COr0xUBSwFKb3B2uCrWXD7JgDVrYt2EU53qcoOGFDrBFzs52n0FW6V1otHLxaurCrTGFSho7j0SXM8;4:ooVPlYvTzKAlws3Y9esS6A/CVvVge/OXeheAj46THGc+gc1OAI8sM9Zkw8wloxpPquYXM9lPjMXTXqGvvoGWPWUO6Y8S+z9WAjOPVqITd3Rk9SSeyWh/80QouBAuYEjMbjrC4pUI7onDAawZjJKCfYI6mIpQHS6E+q6krTsTR7TUa5niYucb2qxFwoN31VPzAgd1VEam8ziJNHOkipbqDdYcoWcV0/b0cK/h7d1N5P9waqpMyzm6NPKc4jDM8hMZpC1ymFuxi3y8gLvc+pv8X8wypqijK0+qdxee8zJEtkI1HFARsoC3LhRFh4wcyqyhespQUGHjE06oPNNp2VMnnotV4FMCfXZdkpiGOoZsWgW8rHDO1vCxpu66FSXF/RwX X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(20558992708506)(9452136761055)(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231254)(944501410)(52105095)(3002001)(10201501046)(93006095)(93001095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(6072148)(201708071742011);SRVR:BN6PR12MB1713;BCL:0;PCL:0;RULEID:;SRVR:BN6PR12MB1713; X-Forefront-PRVS: 0657D528EC X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(346002)(39380400002)(376002)(366004)(39860400002)(396003)(189003)(199004)(377424004)(106356001)(305945005)(1706002)(8936002)(5660300001)(36756003)(52396003)(23676004)(2486003)(50466002)(64126003)(186003)(16526019)(65826007)(110136005)(52146003)(76176011)(8676002)(81156014)(31696002)(4326008)(6116002)(86362001)(97736004)(7736002)(81166006)(575784001)(93886005)(52116002)(25786009)(72206003)(6246003)(59450400001)(2616005)(966005)(46003)(478600001)(65806001)(105586002)(446003)(486006)(6666003)(11346002)(53936002)(6306002)(58126008)(31686004)(6486002)(53546011)(229853002)(54906003)(67846002)(2906002)(386003)(316002)(476003)(2870700001)(47776003)(65956001)(2171002)(68736007)(14583001);DIR:OUT;SFP:1101;SCL:1;SRVR:BN6PR12MB1713;H:[IPv6:2a02:908:1257:4460:1ab8:55c1:a639:6740];FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjZQUjEyTUIxNzEzOzIzOlZjVmMzUVdWcEZXK04xWHhkSHZ2UFcyVy9I?= =?utf-8?B?b2dlQmdWazdaTXhzazBJcyszWVM2aGJCdFJBcENaSTIzTThhV0ZESGg5MXlx?= =?utf-8?B?aVRnQU91U0hKNzU3OE9ROUdVMDdQU2d1RmtSenhOVUZwWSs3Uk9Kdk1scmFP?= =?utf-8?B?bTBTam5FRmk1T1hDM3dPQTlIWlZwcnVhYXpOYWRyLzdGL0ZWSFdiTHBWNGZ5?= =?utf-8?B?S0NjaC9aMCt6TEVNaEJjWW54VkNGblY5M2Z6TTNVL0FuNEZBYk1kaUNWWktI?= =?utf-8?B?a3AwM25EN3FUMm9FbUE1Zi9LNW43VkxPTElORXMza3JnaEpyaC8yYjd1S0pY?= =?utf-8?B?MG1OQVVQSUlMeWFTMFVrcHBNaVh1dlJocmg2dnRNS2R2NjRidXNXTGJKd1JC?= =?ut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nN8wKZLMsD8R7tHr5NwiLobBWJOZgTkumcJv/TF/MZVzcpZVg54h91UCinA2jzwzWkwV25ttoZNbZnWrGAP/I0N5S/xV0OQDbBS16hKk44rd6Smy085qfJKsCvbGqjsGMYoWW9rbeSh1zUSpRPKE3QwvnZiHVs8pAexQjITpHGJ0EMaLev1TGgY3AAxtWtPN14oEcKj0kBrjmeOzOPTmURQ;20:XT4d/PcxzSML/fRZtx8XIhKx2gLetrby+uWPYgD6eEWvN9oOWoh19MKNRa1+yanCIepiw6PO+2HwxDyQRki91j3QcFymAsjtkODbxhU/laRkHp5ynY6dfD6lPfq7UNz/yNLIXBTumdA/4v6j+fnYhH6H5VgN+DeYQeZ6WFAIwl0qECvVY/rVll8oYiN40HDheUr9HPqW1QH2TyvCzqE0DdOFEMmRVnPnhZGZJ2r77r32wkEFrFeUvAfNUp17Qe5w X-MS-Office365-Filtering-Correlation-Id: 8e92634c-8072-4b3e-92d7-08d5ad9f3c49 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2018 07:02:55.3283 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8e92634c-8072-4b3e-92d7-08d5ad9f3c49 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1713 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 29.04.2018 um 01:02 schrieb Michel Dänzer: > On 2018-04-28 06:30 PM, Ilia Mirkin wrote: >> On Fri, Apr 27, 2018 at 9:08 AM, Michel Dänzer wrote: >>> From: Michel Dänzer >>> >>> Previously, TTM would always (with CONFIG_TRANSPARENT_HUGEPAGE enabled) >>> try to allocate huge pages. However, not all drivers can take advantage >>> of huge pages, but they would incur the overhead for allocating and >>> freeing them anyway. >>> >>> Now, drivers which can take advantage of huge pages need to set the new >>> flag TTM_PAGE_FLAG_TRANSHUGE to get them. Drivers not setting this flag >>> no longer incur any overhead for allocating or freeing huge pages. >>> >>> v2: >>> * Also guard swapping of consecutive pages in ttm_get_pages >>> * Reword commit log, hopefully clearer now >>> >>> Cc: stable@vger.kernel.org >>> Signed-off-by: Michel Dänzer >> Both I and lots of other people, based on reports, are still seeing >> plenty of issues with this as late as 4.16.4. > "lots of other people", "plenty of issues" sounds a bit exaggerated from > what I've seen. FWIW, while I did see the original messages myself, I > haven't seen any since Christian's original fix (see below), neither > with amdgpu nor radeon, even before this patch you followed up to. > > >> Admittedly I'm on nouveau, but others have reported issues with >> radeon/amdgpu as well. It's been going on since the feature was merged >> in v4.15, with what seems like little investigation from the authors >> introducing the feature. > That's not a fair assessment. See > https://bugs.freedesktop.org/show_bug.cgi?id=104082#c40 and following > comments. > > Christian fixed the original issue in > d0bc0c2a31c95002d37c3cc511ffdcab851b3256 "swiotlb: suppress warning when > __GFP_NOWARN is set". Christian did his best to try and get the fix in > before 4.15 final, but for reasons beyond his control, it was delayed > until 4.16-rc1 and then backported to 4.15.5. > > Unfortunately, there was an swiotlb regression (not directly related to > Christian's work) shortly after this fix, also in 4.16-rc1, which is now > fixed in 4.17-rc1 and will be backported to 4.16.y. And that's exactly the reason why I intentionally kept this enabled for all users of the TTM DMA page pool and not put it behind a flag. This change has surfaced quite a number of bugs in the swiotlb code which could have caused issues before. It's just that those code path where never exercised massively before. Additional to that using huge pages is beneficial for the MM and CPU TLB (not implemented yet) even when the GPU driver can't make much use of it. > It looks like there's at least one more bug left, but it's not clear yet > when that was introduced, whether it's directly related to Christian's > work, or indeed what the impact is. Let's not get ahead of ourselves. Well my patches surfaced the problems, but the underlying issues where present even before those changes and I'm very well involved in fixing the underlying issues. I even considered to just revert the huge page path for the DMA pool allocator, but it's just that the TTM patches seem to work exactly as they are intended. So that doesn't feel like doing the right thing here. >> We now have *two* broken releases, v4.15 and v4.16 (anything that >> spews error messages and stack traces ad-infinitum in dmesg is, by >> definition, broken). > I haven't seen any evidence that there's still an issue in 4.15, is > there any? Not that I know of, the fix was backported as far as I know. >> You're putting this behind a flag now (finally), > I wrote this patch because I realized due to some remark I happened to > see you make this week on IRC that the huge page support in TTM was > enabled for all drivers. Instead of making that kind of remark on IRC, > it would have been more constructive, and more conducive to quick > implementation, to suggest making the feature not active for drivers > which don't need it in a mailing list post. I have to admit that I'm lacking behind taking care of the amdgpu/radeon user space issues just because of more important stuff to do, but the issues affecting other drivers should be fixed by now. BTW: The user space problems for amdgpu/radeon seems to come from either the DDX or Glamour. For example try playing a video user firefox with Glamour enabled and take a look at how much memory we free/allocate. It's multiple gigabytes for just a few seconds playback, that strongly indicates that we allocate/free a texture for each displayed frame which is quite far from optimal. Regards, Christian. > > > At least, please do more research before making this kind of negative > post. > > P.S. You might also want to look into whether nouveau really should be > hitting swiotlb in these cases. >