From patchwork Fri May 25 12:38:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Hellstrom X-Patchwork-Id: 10427307 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 091896025B for ; Fri, 25 May 2018 12:39:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2A5329555 for ; Fri, 25 May 2018 12:39:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D723129674; Fri, 25 May 2018 12:39:52 +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 843E329555 for ; Fri, 25 May 2018 12:39:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BAADF6E923; Fri, 25 May 2018 12:39:48 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0042.outbound.protection.outlook.com [104.47.36.42]) by gabe.freedesktop.org (Postfix) with ESMTPS id 157966E1CF for ; Fri, 25 May 2018 12:39:46 +0000 (UTC) Received: from localhost.localdomain (155.4.205.56) by BN7PR05MB4579.namprd05.prod.outlook.com (2603:10b6:406:f2::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.820.5; Fri, 25 May 2018 12:39:43 +0000 From: Thomas Hellstrom To: maarten.lankhosrt@linux.intel.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH RFC 2/2] drm: Change deadlock-avoidance algorithm for the modeset locks. Date: Fri, 25 May 2018 14:38:55 +0200 Message-Id: <20180525123855.28956-3-thellstrom@vmware.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180525123855.28956-1-thellstrom@vmware.com> References: <20180525123855.28956-1-thellstrom@vmware.com> MIME-Version: 1.0 X-Originating-IP: [155.4.205.56] X-ClientProxiedBy: HE1PR0902CA0038.eurprd09.prod.outlook.com (2603:10a6:7:15::27) To BN7PR05MB4579.namprd05.prod.outlook.com (2603:10b6:406:f2::13) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:BN7PR05MB4579; X-Microsoft-Exchange-Diagnostics: 1; BN7PR05MB4579; 3:oLp37euGGwePHGRdRgArgTxG+ARDzOisgXR5/qehBcXUGLkhLs63fKxY5UhIKc/w81g/GcSCZ8jl6tg0sCI2tUJ5FVXn6Jgwzux5FLkeq/C05ZrPB/5faj50CaUGeH5ntiwrATu4C3lSLvl8BCPzCClAffm6eQEwaA0iYLelhm3gLiYTvPgkvSfCK1F51ArBtqLXH4WIH0Q0XKIA186DDB6bul41pGrp2ZcNM8A4SVmpuJTfHxxXQ9rD9QLZUDmQ; 25:I6pC+1lJdw3NhwH2Sjg4SUyLDivblv4qMUSL74Wq9gzee6vWtQoZ1eDZk38y3KYCE/0h8B6hSG6blqbilNOTh752ladAeviMb2UStpfjt9IGpvNxI7YZGr7fqPK7YUVH3BgIaie8vXg4ryzdrRErJXPJCSdsBhLeEoCcTo8N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Oib6iKx6kONGg9KxK4k6aDVfXR9X4AT5HF4QBdnW/q+vohC75fgWPWf4cH5LuA7yIs+VKc5+hSWDxd9vBwc7ENAwwv0K373fqxU5uSOIrxiPfYLwMWULkr7FyhIbXW2M/b74GiXYFZSdIeEksAgvZcO1mzR6/T9ZXKdukXb40y1ievbJKtSGFUAQOgLhGFhin+HJcsUpvn8UMXYH+gOm7GFCRIgeqBNjWYI0hbkJ8JxeRVuzHSd 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)(10201501046)(93006095)(93001095)(3002001)(3231254)(944501410)(52105095)(149027)(150027)(6041310)(20161123562045)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:BN7PR05MB4579; BCL:0; PCL:0; RULEID:; SRVR:BN7PR05MB4579; X-Forefront-PRVS: 06833C6A67 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(376002)(346002)(366004)(39860400002)(396003)(39380400002)(199004)(189003)(36756003)(446003)(48376002)(50466002)(6506007)(386003)(25786009)(6486002)(5660300001)(476003)(11346002)(26005)(68736007)(76176011)(956004)(2616005)(59450400001)(7736002)(51416003)(52116002)(478600001)(4326008)(305945005)(186003)(16526019)(486006)(6666003)(97736004)(6116002)(8676002)(81156014)(106356001)(50226002)(107886003)(1076002)(86362001)(3846002)(81166006)(105586002)(8936002)(6512007)(2906002)(53936002)(316002)(16586007)(47776003)(66066001)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN7PR05MB4579; H:localhost.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-asc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pxfW5g0TjiJrOnlrrgDumKdhj1UWxeWyrgW1WogKkqUcOqCtlXQ655wYzmBEFel01ViREyBPQhewx9Pl702J9qubMfVzZnTfb/mIxXIVWb7pVpPb3odn6a2xSGjct+XJKw/pAQ0gtcMAECgg2rtlmDJ13F0MXPzZt+jbS/dg==; 5:yWE7BVdRn2pbwUa5hdKJFmzEWMEAuIm3/1EAMqsan15Dr+TDJUFNRS8G9wh6zEqXO5IN/63T4FVFhzoXfVf2T5rTtH5yudlR0fl4BzxP1aq8ExA+eqs9//rHWKdeQw9ALig3x/tZwljsQVpLzT5aM9misj0ICo0FRqk6aD32M8s=; 24:0OcjIKPSNMvQGL0rg3z8td3zChEz4uE9ffxCz1zH1jXWsSCmGYtUQHqYdfyxUTBG2auDKPZY52r58kkbIifMB7mMZEHskQ95vcaqL0MzmC4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN7PR05MB4579; 7:tCRUZ35FNFkP8oOKQQ2d5f4HAf7omYTouj1YhS6XjTxZ1oRIPqP1k8vjNk5nLliCmWOnU4t5x+cFAud+CG7TSIfrevhiQ+HckNUHyAXJqlkEhA4ECzZmJ2xwqORC/VszSWvqlbIyHf7Chckj6hunDbNc4FdEnmkfwOlOLoapi/H5LcNAyxFS4/rhY0nEi1wmM021Kg1utHHwmTV0yfVDDk2L/FrlEeQdsO0xwG/qqc41DvkFfNeUHafz13WtLjOE; 20:HfF1h7G1kPitRopkYbZpbsB1JaNWae8RjR6/g3RH31iZ5pXuERz8/U4zzCAAS+s7SgFmsv3F5qRQbsfnyBYJIoQ6pYHQwWdvRuMmHOKKI3sD3U5M8NrO1e5ngXytkv2DcFGwOoRT9NO+wiH6eZwNwl0qK4u4wG7v40Firrew3/0= X-MS-Office365-Filtering-Correlation-Id: edb79d94-5bc5-40f0-0795-08d5c23c9806 X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2018 12:39:43.8475 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: edb79d94-5bc5-40f0-0795-08d5c23c9806 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR05MB4579 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 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP For modeset locks we don't expect a high number of contending transactions so change algorithm from Wait-Die to Wound-Wait. Signed-off-by: Thomas Hellstrom --- drivers/gpu/drm/drm_modeset_lock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_modeset_lock.c b/drivers/gpu/drm/drm_modeset_lock.c index f22a7ef41de1..294997765a2c 100644 --- a/drivers/gpu/drm/drm_modeset_lock.c +++ b/drivers/gpu/drm/drm_modeset_lock.c @@ -70,7 +70,7 @@ * lists and lookup data structures. */ -static DEFINE_WW_CLASS(crtc_ww_class, true); +static DEFINE_WW_CLASS(crtc_ww_class, false); /** * drm_modeset_lock_all - take all modeset locks