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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT 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 023CAC4338F for ; Fri, 20 Aug 2021 12:05:36 +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 B27F160ED5 for ; Fri, 20 Aug 2021 12:05:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B27F160ED5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C3DE46EA75; Fri, 20 Aug 2021 12:05:34 +0000 (UTC) Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8DC1C6EA73 for ; Fri, 20 Aug 2021 12:05:33 +0000 (UTC) Received: by mail-wm1-x334.google.com with SMTP id v20-20020a1cf714000000b002e71f4d2026so1238605wmh.1 for ; Fri, 20 Aug 2021 05:05:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=IQ+jBT8vlFg/eykYyV9eMquI3NUUi3FkmRtuCgkgOuY=; b=Gotd+9ln1CjdH1/VRJqdBlNYC+QxeUVcCg3Cj4q2RgYat80Hn2UAudjfKFs97QrZEd z4G3A4evLAOkllETCmKcvYhfs3xqc5HGbbfEv/RuTD39L8ZAShzygL+3jvThyUqDPup3 Wfg4LkFSlEwYZGhlDcWlo0fEq5JMSBIay69LNLA/LPlCBRGWUIR7mXaZVEL2el8Qpv8i aCP8paMeLOcGHS0efKqYMLglA49UjKWt7ar4wQjPqZ7215fgvcUDObw+xlTiySVhKMnp D+5h2IN7MILF+P1U4VED7Iv/9wpVGBfVwbrX3EcZO18pckz45q5vsgVhXJwKl9HRb+fq t2bA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=IQ+jBT8vlFg/eykYyV9eMquI3NUUi3FkmRtuCgkgOuY=; b=FekKeiOzxW9PeVLZ0umiEUbM77N+SjpRI6xWlQQQ8TXW8vi2j7b7uB1TXUBweHbIee buJHAoZR+LMOyMB7WXbRrK8jxkHsAc76Ctc7UpSN2YLnWiQogvLKdHGqejclEOBJFRg8 NfFktUnsIyat6/ey8F3D90Tx8rxxx7tKHxdXzAgc90rHq3g2Kg55Zcf6w1IVm5IKoCvh 34EPcbE0tNMKxDHceAmHD1SycYCqCIiaoHUxh5IIFQ5QvSMMacAamL4V+ctuHHK/OGnx 72aNBnlp8ZtLUPs/T2FhcvUrXq2l4RFgUHD0QEJdxh5yqRUTCbWSb/9OKNxbn3lIiSfM 1c/Q== X-Gm-Message-State: AOAM532O3xGIl+52E2J0FSwoOS8yKt4n9Y6ldou1vSuG8igu1Pxs5l8Y KgdvWGn8QW1mSRoUAeIT9i7yBjq1IWg+bCOm X-Google-Smtp-Source: ABdhPJwjelRFhx5ibnHfmquLKvnFNuRjYvqFhqusFs1GMpKQdLbW2e1MF7emnBzu1XsuuzjbjB78+A== X-Received: by 2002:a05:600c:1405:: with SMTP id g5mr3572230wmi.40.1629461132100; Fri, 20 Aug 2021 05:05:32 -0700 (PDT) Received: from abel.fritz.box (p5b0ea1b5.dip0.t-ipconnect.de. [91.14.161.181]) by smtp.gmail.com with ESMTPSA id r12sm6139818wrv.96.2021.08.20.05.05.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Aug 2021 05:05:31 -0700 (PDT) From: "=?UTF-8?q?Christian=20K=C3=B6nig?=" X-Google-Original-From: =?UTF-8?q?Christian=20K=C3=B6nig?= To: akpm@linux-foundation.org Cc: dri-devel@lists.freedesktop.org, daniel@ffwll.ch Subject: Adding sync_shrinkers function for TTM pool optimization Date: Fri, 20 Aug 2021 14:05:26 +0200 Message-Id: <20210820120528.81114-1-christian.koenig@amd.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Andrew, Daniel suggested that I ping you once more about this. Basically we want to add a barrier function to make sure that our TTM pool shrinker is not freeing up pages from a device while the device is being unplugged. Currently we are having a global mutex to serialize all of this, but this caused contention for unmapping the freed pages in the IOMMU. We just need your Acked-by and I hope my explanation is now more understandable than the last time. Cheers, Christian.