From patchwork Tue Jul 3 19:14:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Hellstrom X-Patchwork-Id: 10504995 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E3CD2601D3 for ; Tue, 3 Jul 2018 19:16:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E26EC286AE for ; Tue, 3 Jul 2018 19:16:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D6E5E286F7; Tue, 3 Jul 2018 19:16:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 268E4286AE for ; Tue, 3 Jul 2018 19:16:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0FB6E6E8C4; Tue, 3 Jul 2018 19:16:35 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM05-BY2-obe.outbound.protection.outlook.com (mail-eopbgr710047.outbound.protection.outlook.com [40.107.71.47]) by gabe.freedesktop.org (Postfix) with ESMTPS id A1D5D6E8BC for ; Tue, 3 Jul 2018 19:16:32 +0000 (UTC) Received: from fedoratest.localdomain (155.4.205.56) by DM6PR05MB4587.namprd05.prod.outlook.com (2603:10b6:5:9f::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.930.11; Tue, 3 Jul 2018 19:16:29 +0000 From: Thomas Hellstrom To: dri-devel@lists.freedesktop.org Subject: [PATCH -next 04/15] drm/vmwgfx: Use blocking buffer object reserves when evicting resources Date: Tue, 3 Jul 2018 21:14:49 +0200 Message-Id: <20180703191500.2374-5-thellstrom@vmware.com> X-Mailer: git-send-email 2.18.0.rc1 In-Reply-To: <20180703191500.2374-1-thellstrom@vmware.com> References: <20180703191500.2374-1-thellstrom@vmware.com> MIME-Version: 1.0 X-Originating-IP: [155.4.205.56] X-ClientProxiedBy: DM5PR21CA0042.namprd21.prod.outlook.com (2603:10b6:3:ed::28) To DM6PR05MB4587.namprd05.prod.outlook.com (2603:10b6:5:9f::24) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1dcddffd-c6e9-4ddd-1711-08d5e1197b77 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:DM6PR05MB4587; X-Microsoft-Exchange-Diagnostics: 1; DM6PR05MB4587; 3:vDr+tUalaAkHHSgv1cc4IP+JcB72xcDOWD+lRDX+eNh3HVC5TIHdTs1CTcMPemeYo98poEEO8mtYAtqk9Rv9kV51dnSfG/wVMwtoyuZZXjMywwkHChovTY9twOCb6YBFyxg7EnQVDk9W41FPb2Gk5CRZE/7wK58+aKt+l8xGnkSPLW92LrjlHQFviAFlz1slmv2aEHWSNMkL9ExSoMz52d0F34q/JljdwUsPfqwSSTLCC5eqD6b7pTDk4z4ufWc7; 25:lP1irfd4ZDZUMeBvvbHfuC9A8IzQj7kLo3Fo14XzCP5XM5xtxMcY1CrzBHJtk+mdiLhSHngSKOMOMml5BVX5nGduS1VnH2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JowY+lC0eCr3+gNTDASIUzvSl/Jx7JMwCOGkFN; 4:CtvMppUXeGznrfvUtoevvNx7cRDnmleEgoR1JcURoZTR8lvttYfYDGKGlh6F12/9xrLx/j9VKYghlRRZZFdASrHYvRKP1Jw8iXarg98uuePbQ+aqyW4Kccgm14b+OFX2MiH2Pt//hCwavNaw+Q7bT29KyiStR/N/UDioNomGgSKMH46B3enHCMV2cz8NPSy00+iVIei4svIizkn1ytOgBtenvpBmHuHWGIJ/+yfcSq9L/3Mdm1rXRiOpqAAmXpUTv2oaHRXp0JQuS829zfnoPII/oBJdueQkIM6PWzP7UU0oZnIvP/vWROiLvef1aNvI X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(61668805478150); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(3231254)(944501410)(52105095)(93006095)(93001095)(149027)(150027)(6041310)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:DM6PR05MB4587; BCL:0; PCL:0; RULEID:; SRVR:DM6PR05MB4587; X-Forefront-PRVS: 0722981D2A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(136003)(366004)(39860400002)(396003)(376002)(346002)(199004)(189003)(2361001)(53936002)(76176011)(68736007)(52116002)(51416003)(47776003)(26005)(2351001)(50226002)(16526019)(97736004)(86362001)(386003)(2906002)(6506007)(66066001)(186003)(316002)(16586007)(48376002)(446003)(6486002)(50466002)(14444005)(11346002)(2616005)(1076002)(956004)(6116002)(6512007)(476003)(81166006)(8676002)(81156014)(36756003)(3846002)(5660300001)(486006)(107886003)(106356001)(305945005)(25786009)(7736002)(4326008)(478600001)(6916009)(105586002)(6666003)(8936002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR05MB4587; H:fedoratest.localdomain; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: vmware.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM6PR05MB4587; 23:3uAMb5+goq+whlNQK8UGZ1ESYuz3sMMYn9kD1byhm?= =?us-ascii?Q?9mTWyyRkSLSzFmCtvmjIih3JLCr18/qR4a//CfOv9eoO4F5duE7Bo2KTefMf?= =?us-ascii?Q?aQ2NTOSkt1V1eM915xh+ccrXbp4mRm+xC4eyj7BYWeQhoYGa95mE8KiAsmX0?= =?us-ascii?Q?g0m6a3x8xthCJSn1mCl9zjJlbKB1Ngw3dEpiTp7XMfLt+Fj6Oj+yW/Ig/PAW?= =?us-ascii?Q?0c+E4J1VIiZGRQWaIi2hTBr71F47rs8sHE9H8WuBi/q+GVeoOj3p9DuBb0ci?= =?us-ascii?Q?6AMHM8gDOiw38Z3+jrHT/uUUxO2a7qxUlnKNPMmcFcT3zk8aIYMRCXuNqBNc?= =?us-ascii?Q?3UJZZ+TIYQiUZw+W7MxLu0SKq6X3R7pIB3G9awCysAe3Fiz1zRV6RMmRAwTi?= =?us-ascii?Q?GPMWb0vvPMs+mqOkeHtlXfY2l2lX2bU3AMWLHieS6mhs1IKR3bVD0RcNB2pi?= =?us-ascii?Q?/d0WHjbe+49qTINVCCK9qYsHCaLcAlw/mSvl0gPZvubd/DhcZJZJHWA/lOz+?= =?us-ascii?Q?FzGsLxDG+DBitNzGqgBWA5X0/Lqi/jZ5Oi3E7Q2rQoAAbz78AjSVbu02r2Gm?= =?us-ascii?Q?5XPXUcgSpcFMfE/jGdvD4AWS31nQYVqxtbkNAwXgaMsoJB8jZhnVdg/htIx0?= =?us-ascii?Q?VtwrY2pK+aLOdDze7QUvolFBWk1GnAvqanwm/9TCLE01skxlrdqXtiLwRVY6?= =?us-ascii?Q?HlCnT8Yd2XIEPuA/0BQ16gu5c19XNO9rvAHapsZJA1egtfYeI8goPTY7ZM2a?= =?us-ascii?Q?wOxGQ+cBmQzrVi/T37WoA1aRpO9F870ShlbYtTx6kLX4K34y4B7MlYgg9/W0?= =?us-ascii?Q?Tl0PiOiRjCUdgI3hqLmG7+DCDNKVPiEZDyAP8lGyVtv6WXeoVegfOwp6aYdy?= =?us-ascii?Q?htmInE22IZRsK0zW68pUziWbKMeDX2TJl/zet2S3O2aApjau+LkItvHzUuww?= =?us-ascii?Q?yujae57b65oj20EASeVtqUT3kfw2qM6GveO7YeVxMApbgoTlh18GniuQa32z?= =?us-ascii?Q?60uAXIEGGIIYFiLOW6VnnRNLK1PvXgjjNbvegaZnjRYJoFCSafttn7fRP2uc?= =?us-ascii?Q?TGKePTit+3SbbpHq8D6qXwiKtaEfHaHSJl75HRZ0vMplL/c27c29XpDZAdpy?= =?us-ascii?Q?fPZh4rst8UNX/PSNG5gro3Cw+3y+y3Tym5MN+ABnzksF9XMMXpa+vgELU+Em?= =?us-ascii?Q?jJB3gkNyj+525b8VYPS6I4lcfUay14WeLWkNu2DIPI4KSqZNKTP7vRXzRlVE?= =?us-ascii?Q?H2eFWUBuGYxoZ6Or8R+eW8ZBshumBbPYnJkNoga?= X-Microsoft-Antispam-Message-Info: AiI87JUQDNxIKClxrQV2hiFeqkLgHwIHVT2u+3KI7Isa0qfbCHdaIl1LpZRpOrDA8nHeIHNHWlj8oZBLscCifOehlCtJEU2vKV2Hz3LzY2kDyUbM17FFHNAPFC2O2YUPeZ/ia5Mxnt+Pp+VlGIddDq2yoAfG6/CrEbKx2s1AQQr20ZeRtK4cWB05bv3021sJ9qeEOGT+vfw8yvF75w5CYYjRzIqTmt4A5hltHDVdjJ7vpdi5A5zeJy8CqwmAUZFuBh9yBmWyYeVLy3fgbzy+9Rl7yfLiCDFiw7uBZz9HInhlqgxoXZr3KadMj/eAmhLxjoG+lzDDMZA59LjnAorztlfvW34px0SlVS/jp70yK/4= X-Microsoft-Exchange-Diagnostics: 1; DM6PR05MB4587; 6:aLLwjd4epYymEqQup+sZDT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fCRQGLZWN21gt0ZcESuHeVAII+KnHFKyfIWkwgU5gwr3YeTW0C22rBUacxeMw4qChrpW6HJPiSCIWQXArNZBFfNv3SGaZruKj++dbo5sz3ZhT34Lha34kKmHXLmwifOq1oIx3BOjUssICSQT6wz47/lkA74YhYFSI= X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2018 19:16:29.7632 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1dcddffd-c6e9-4ddd-1711-08d5e1197b77 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR05MB4587 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Hellstrom , linux-graphics-maintainer@vmware.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Previously when evicting resources we were unconditionally calling ttm_eu_reserve_buffers with a NULL ww acquire context. That meant all buffer object reserves were done using trylock semantics. That makes sense when evicting during resource validation, because then there already are a number of buffers reserved and using waiting locks would cause lockdep errors. That's not the case when unconditionally evicting all resources as part of driver takedown or hibernation, so in that code path, make sure we have a ww acquire context to get waiting lock buffer object reserve semantics. Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul Reviewed-by: Sinclair Yeh --- drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 29 ++++++++++++++++-------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c index 6d2cad744f5d..3b2d9b6c50fc 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c @@ -433,6 +433,7 @@ void vmw_resource_unreserve(struct vmw_resource *res, * for a resource and in that case, allocate * one, reserve and validate it. * + * @ticket: The ww aqcquire context to use, or NULL if trylocking. * @res: The resource for which to allocate a backup buffer. * @interruptible: Whether any sleeps during allocation should be * performed while interruptible. @@ -440,7 +441,8 @@ void vmw_resource_unreserve(struct vmw_resource *res, * reserved and validated backup buffer. */ static int -vmw_resource_check_buffer(struct vmw_resource *res, +vmw_resource_check_buffer(struct ww_acquire_ctx *ticket, + struct vmw_resource *res, bool interruptible, struct ttm_validate_buffer *val_buf) { @@ -459,7 +461,7 @@ vmw_resource_check_buffer(struct vmw_resource *res, val_buf->bo = ttm_bo_reference(&res->backup->base); val_buf->shared = false; list_add_tail(&val_buf->head, &val_list); - ret = ttm_eu_reserve_buffers(NULL, &val_list, interruptible, NULL); + ret = ttm_eu_reserve_buffers(ticket, &val_list, interruptible, NULL); if (unlikely(ret != 0)) goto out_no_reserve; @@ -477,7 +479,7 @@ vmw_resource_check_buffer(struct vmw_resource *res, return 0; out_no_validate: - ttm_eu_backoff_reservation(NULL, &val_list); + ttm_eu_backoff_reservation(ticket, &val_list); out_no_reserve: ttm_bo_unref(&val_buf->bo); if (backup_dirty) @@ -524,10 +526,12 @@ int vmw_resource_reserve(struct vmw_resource *res, bool interruptible, * vmw_resource_backoff_reservation - Unreserve and unreference a * backup buffer *. + * @ticket: The ww acquire ctx used for reservation. * @val_buf: Backup buffer information. */ static void -vmw_resource_backoff_reservation(struct ttm_validate_buffer *val_buf) +vmw_resource_backoff_reservation(struct ww_acquire_ctx *ticket, + struct ttm_validate_buffer *val_buf) { struct list_head val_list; @@ -536,7 +540,7 @@ vmw_resource_backoff_reservation(struct ttm_validate_buffer *val_buf) INIT_LIST_HEAD(&val_list); list_add_tail(&val_buf->head, &val_list); - ttm_eu_backoff_reservation(NULL, &val_list); + ttm_eu_backoff_reservation(ticket, &val_list); ttm_bo_unref(&val_buf->bo); } @@ -544,10 +548,12 @@ vmw_resource_backoff_reservation(struct ttm_validate_buffer *val_buf) * vmw_resource_do_evict - Evict a resource, and transfer its data * to a backup buffer. * + * @ticket: The ww acquire ticket to use, or NULL if trylocking. * @res: The resource to evict. * @interruptible: Whether to wait interruptible. */ -static int vmw_resource_do_evict(struct vmw_resource *res, bool interruptible) +static int vmw_resource_do_evict(struct ww_acquire_ctx *ticket, + struct vmw_resource *res, bool interruptible) { struct ttm_validate_buffer val_buf; const struct vmw_res_func *func = res->func; @@ -557,7 +563,7 @@ static int vmw_resource_do_evict(struct vmw_resource *res, bool interruptible) val_buf.bo = NULL; val_buf.shared = false; - ret = vmw_resource_check_buffer(res, interruptible, &val_buf); + ret = vmw_resource_check_buffer(ticket, res, interruptible, &val_buf); if (unlikely(ret != 0)) return ret; @@ -572,7 +578,7 @@ static int vmw_resource_do_evict(struct vmw_resource *res, bool interruptible) res->backup_dirty = true; res->res_dirty = false; out_no_unbind: - vmw_resource_backoff_reservation(&val_buf); + vmw_resource_backoff_reservation(ticket, &val_buf); return ret; } @@ -626,7 +632,8 @@ int vmw_resource_validate(struct vmw_resource *res) write_unlock(&dev_priv->resource_lock); - ret = vmw_resource_do_evict(evict_res, true); + /* Trylock backup buffers with a NULL ticket. */ + ret = vmw_resource_do_evict(NULL, evict_res, true); if (unlikely(ret != 0)) { write_lock(&dev_priv->resource_lock); list_add_tail(&evict_res->lru_head, lru_list); @@ -809,6 +816,7 @@ static void vmw_resource_evict_type(struct vmw_private *dev_priv, struct vmw_resource *evict_res; unsigned err_count = 0; int ret; + struct ww_acquire_ctx ticket; do { write_lock(&dev_priv->resource_lock); @@ -822,7 +830,8 @@ static void vmw_resource_evict_type(struct vmw_private *dev_priv, list_del_init(&evict_res->lru_head); write_unlock(&dev_priv->resource_lock); - ret = vmw_resource_do_evict(evict_res, false); + /* Wait lock backup buffers with a ticket. */ + ret = vmw_resource_do_evict(&ticket, evict_res, false); if (unlikely(ret != 0)) { write_lock(&dev_priv->resource_lock); list_add_tail(&evict_res->lru_head, lru_list);