Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2102532imm; Thu, 7 Jun 2018 05:35:12 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIQD17F6qeE1PFA85Gmm9lhRUWzU4vICbb/V+/AambnQBEr4uw7kIx9/kMEetel/TpLVMzJ X-Received: by 2002:a17:902:8a82:: with SMTP id p2-v6mr1887045plo.244.1528374912939; Thu, 07 Jun 2018 05:35:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528374912; cv=none; d=google.com; s=arc-20160816; b=GYbgCtVylY53Ap8FlK8TCoH5ankyuimW4+h4eXf8bxervMQjgKEm5so1z6dgTVoFyn Mrapz3/OBlIxTHpWXf3h98lQp9/E+Wb1wm5wEUQFrUpizR+OZb2voZsAqTKHky+HfDoJ Cd+7rVLTNTBKJ0rVcnmFSLxuJIugrEQX10FyG+xn8GGyVtLKPG8+wBbCKl9WvN+iJGaH z1fZyHijMhZb3tip/TGOOCsts2ItXjiM/hP3W3m08fdyZUElHvHj/26ZmSdqjKosiyNj VTSAKkYshqhAbWywpo/xus3MPk4JtFgXjedy4R1EpCViEEnL1qAtB+StNGDgwq8+ieJB w/Yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :dkim-signature:arc-authentication-results; bh=ggJIrkGvnqS7MZXBl9lhXRo6QP4HS/i/CZqN/A01uvI=; b=LMYSQTd6DVVnBlN8lFUeuq40e+dlg4aUYv4bLcLIyfGCUPzAidjR93yEtqo+FuvJSi 622J8jYVCs9I7pDePYJ7ZLnsaWdegSvFwnMK8cQkOs0HT2B2MIVWZmLK3yUIZS0kVsBb iA1NIj9AUKFMukeHzv3Rbu04mWi7hTaNc9Zs/p0Bysunncuw0yWIiRZvYo5+EpAKHcqq ocJowjO0HAlXsKrnUpX14iu9uY335cR5870TTwyqn+4pWX/gEAZDw1EGMAP4Znhc4me6 Bs4a6cAyvkXHjhtVb+pzcqWgZ3MY2+oL/ZMYlIz6yekDjQoXweEpJkqqYfkJMRdlnsAa QHVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=f2/pn+DZ; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bj6-v6si11254967plb.562.2018.06.07.05.34.56; Thu, 07 Jun 2018 05:35:12 -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=@gmail.com header.s=20161025 header.b=f2/pn+DZ; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753605AbeFGMdT (ORCPT + 99 others); Thu, 7 Jun 2018 08:33:19 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:39522 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753149AbeFGMdS (ORCPT ); Thu, 7 Jun 2018 08:33:18 -0400 Received: by mail-lf0-f67.google.com with SMTP id t134-v6so14423920lff.6 for ; Thu, 07 Jun 2018 05:33:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=ggJIrkGvnqS7MZXBl9lhXRo6QP4HS/i/CZqN/A01uvI=; b=f2/pn+DZ9G4F7ROv/QIlCBlbowzWeJLaKQuuIrEiEMdW2/gHWucfphD5PSu+/YN1+N G8NfqXiGDCFpmE697eVGGdEMbzgROoZDFOP4YXiiYRFvekLFQkA4tdM2gMgtRPUprYWD 2Tp7U9cRsVhd+6ddIUr/MGxYsmWSFPowI1MaqE2a2KnDfUXqv9o5Zwy140hemwDuwybC +8qJuWnJNCYNP0WPUoV5saAmbemvk182XJ2KMTUWJoHg2dGln6blVb36UmASQfYhMcDB NI6m2Zqlngael1afhB+NVKADzEAAIFdhEf2K9mh8bqbGQid/iEMP39ygTTjJZxejTc3v Ed3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=ggJIrkGvnqS7MZXBl9lhXRo6QP4HS/i/CZqN/A01uvI=; b=logcvdBPF1IL6/8u2rsKn+um6xOxRw3bDL+VKXkC9/PN4A8af5GfY5IC0bym9n91Ty A5P5Rd7h1LE+EYuUAAmrqmPmRVGASZ8b4t7tt+IG/PIoSpAq21Z068qXu/zeL209FwDr k8oSsUHceHIGBnS+gUOPs2ibhYGDWvhIlFirx66Jrt1THELvd0QGvv4ryYhkB42AFeqC Lgre8B2P7nKsVy3Agkw5QVaFtoYUnO9Okkb7pnxr7hpmKsC2OAwYLr4HmUX3BuXYyhJA GBOJh5AH5sxUEDwf/KFiwWF73OWj300jlqs4LWJ+gpiPpj1lyAb70swWzc+FMIZ+uH90 KZVA== X-Gm-Message-State: APt69E3G3Cn0W+MiUDpEiNirADgKN7+yih00p7kE0e8b+LOM4SC3ytx9 7fMHoVE/Pwgt9tfUJS7Q+c1T2tMjyiU+z+gawg== X-Received: by 2002:a19:c90d:: with SMTP id z13-v6mr1277807lff.0.1528374796670; Thu, 07 Jun 2018 05:33:16 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a19:e45c:0:0:0:0:0 with HTTP; Thu, 7 Jun 2018 05:32:46 -0700 (PDT) In-Reply-To: <267c42ce-91e2-4843-3815-904ac74b2f44@amd.com> References: <516cddbe-73c2-01f3-a552-0d9fd75ce63a@amd.com> <8f7d00f9-992f-cc07-6bd0-b1b47c5d2ccf@amd.com> <267c42ce-91e2-4843-3815-904ac74b2f44@amd.com> From: Gabriel C Date: Thu, 7 Jun 2018 14:32:46 +0200 Message-ID: Subject: Re: Kernel and ADM hardware roulette ( was AMD graphics performance regression in 4.15 and later ) To: =?UTF-8?Q?Christian_K=C3=B6nig?= Cc: =?UTF-8?Q?Michel_D=C3=A4nzer?= , Jean-Marc Valin , Dave Airlie , Felix Kuehling , LKML , dri-devel@lists.freedesktop.org, alexander.deucher@amd.com, Andrew Morton , Linus Torvalds , Tom Lendacky , Joerg Roedel , Christoph Hellwig Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-06-07 9:07 GMT+02:00 Christian K=C3=B6nig : > Am 06.06.2018 um 17:44 schrieb Gabriel C: >> >> 2018-06-06 17:03 GMT+02:00 Michel D=C3=A4nzer : >>> >>> On 2018-06-06 04:44 PM, Christian K=C3=B6nig wrote: >>>> >>>> Am 06.06.2018 um 16:12 schrieb Michel D=C3=A4nzer: >>>> [SNIP] >>>> At least in theory it should work when we use the coherent DMA >>>> allocator. >>>> >>>> When that really worked before, so the most likely commit which broke >>>> this is: >>>> >>>> commit fd5fd480dd8fe4910546e7b080b3ae345e57fe9f >>>> Author: Chunming Zhou >>>> Date: Fri Feb 9 10:44:09 2018 +0800 >>>> >>>> drm/amdgpu: only enable swiotlb alloc when need v2 >>>> >>>> get the max io mapping address of system memory to see if it is >>>> over >>>> our card accessing range. >>>> v2: move checking later >>>> >>>> Signed-off-by: Chunming Zhou >>>> Reviewed-by: Monk Liu >>>> Reviewed-by: Christian K=C3=B6nig >>>> Signed-off-by: Alex Deucher >>>> >>>> Currently looking into how we could somehow improve this detection. >>> >>> I guess this could fit for Gabriel, but e.g. >>> https://bugs.freedesktop.org/104437 says amdgpu was already broken with >>> SME in 4.15, if not 4.14 (I suspect there was simply no SME support >>> earlier). > > > And what I totally missed is that Gabriel is using radeon and not amdgpu. > > So Gabriel you need to revert this one for testing: > commit 1bc3d3cce8c3b44c2b5ac6cee98c830bb40e6b0f > Author: Chunming Zhou > Date: Fri Feb 9 10:44:10 2018 +0800 > > drm/radeon: only enable swiotlb path when need v2 > > swiotlb expands our card accessing range, but its path always is slow= er > than ttm pool allocation. > So add condition to use it. > v2: move a bit later > > Signed-off-by: Chunming Zhou > Reviewed-by: Monk Liu > Reviewed-by: Christian K=C3=B6nig > Signed-off-by: Alex Deucher > Link: > https://patchwork.freedesktop.org/patch/msgid/20180209024410.1469-3-david= 1.zhou@amd.com > >> I got strange performance issue with 4.15 and 4.16 .. but SME was ON >> on that setup ( even before it hit mainline ) and never broke the GPU li= ke >> this. > > > Well that is very interesting, you are the first one who reports that SME= + > GFX works in some way. So far we only got negative reports for that. > >> There is a 4.16.13 boot dmesg which has no such issue: >> >> >> http://ftp.frugalware.org/pub/other/people/crazy/radeon/dmesg-radeon-SME= -ON-kernel-4.16.txt >> >> With the setup as is booting 4.16.x works , while 4.17 trows the errors. > > > Please do the bisect if the patch I've mentioned above doesn't help. Ok done.. bisect points to: b468620f2a1dfdcfddfd6fa54367b8bcc1b51248 is the first bad commit commit b468620f2a1dfdcfddfd6fa54367b8bcc1b51248 Author: Christoph Hellwig Date: Mon Mar 19 11:38:19 2018 +0100 iommu/amd_iommu: Use CONFIG_DMA_DIRECT_OPS=3Dy and dma_direct_{alloc,fre= e}() This cleans up the code a lot by removing duplicate logic. Tested-by: Tom Lendacky Tested-by: Joerg Roedel Signed-off-by: Christoph Hellwig Reviewed-by: Thomas Gleixner Acked-by: Joerg Roedel Cc: David Woodhouse Cc: Joerg Roedel Cc: Jon Mason Cc: Konrad Rzeszutek Wilk Cc: Linus Torvalds Cc: Muli Ben-Yehuda Cc: Peter Zijlstra Cc: iommu@lists.linux-foundation.org Link: http://lkml.kernel.org/r/20180319103826.12853-8-hch@lst.de Signed-off-by: Ingo Molnar I'll try to revert this once I'm home. BR