From patchwork Fri Dec 22 02:05:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "He, Hongbo" X-Patchwork-Id: 10128649 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 CC3746019C for ; Fri, 22 Dec 2017 02:05:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BD36C2A031 for ; Fri, 22 Dec 2017 02:05:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B08372A033; Fri, 22 Dec 2017 02:05:21 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID 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 D6DE02A031 for ; Fri, 22 Dec 2017 02:05:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8A3B16E0C9; Fri, 22 Dec 2017 02:05:18 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0064.outbound.protection.outlook.com [104.47.37.64]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4B6306E0C9; Fri, 22 Dec 2017 02:05:16 +0000 (UTC) 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=euM8h25LkaY9Ubt7+aRyrkiySLw/ngDioxu9WZ2R3/s=; b=PPxB+/fcWSzx8n+0Orc/BtEGzx8wXFAleAVEJ3UnY2LQNgtOcRjaEvFm2smdrO20nl8vdAIgGzJ2rkqDpjZxpZg30ulWhUsMBK+pJjJuBCFNH1yNsfMIRUuEZio9xsPdHiRNfNiZfP8yLo6CjvWibrsOv7r6bva38LDCEBuW6gQ= Received: from MWHPR1201MB0127.namprd12.prod.outlook.com (10.174.98.142) by MWHPR1201MB0126.namprd12.prod.outlook.com (10.174.98.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.345.14; Fri, 22 Dec 2017 02:05:11 +0000 Received: from MWHPR1201MB0127.namprd12.prod.outlook.com ([10.174.98.142]) by MWHPR1201MB0127.namprd12.prod.outlook.com ([10.174.98.142]) with mapi id 15.20.0345.013; Fri, 22 Dec 2017 02:05:11 +0000 From: "He, Roger" To: =?utf-8?B?Q2hyaXN0aWFuIEvDtm5pZw==?= , "dri-devel@lists.freedesktop.org" , "amd-gfx@lists.freedesktop.org" Subject: RE: [PATCH] drm/ttm: drop the spin in delayed delete if the trylock doesn't work Thread-Topic: [PATCH] drm/ttm: drop the spin in delayed delete if the trylock doesn't work Thread-Index: AQHTeoZZrFm1AnYmQU6KrNIM1h3F9KNOnEJA Date: Fri, 22 Dec 2017 02:05:11 +0000 Message-ID: References: <20171221180546.1281-1-christian.koenig@amd.com> In-Reply-To: <20171221180546.1281-1-christian.koenig@amd.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Hongbo.He@amd.com; x-originating-ip: [116.228.147.241] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; MWHPR1201MB0126; 20:kNDMBnYkpN99Y0/oWefFMuBqTMtiJoujSlX9/SFO1d1m0Kedp439MoLtESM7/1k+T9w6bGsWTfJrVy/4RDWmO3d0m5Mi/BxeaMe+OLAJMJW81uv9MHmn6YwbPAjQut6+fz5i/louGRUmmXXkFGSCq2ucW0mM22MQY7qC5dVzFmfCgVO/o6rGG+zlJqbsTtFsq8wgwIWtirr2nhPDwdQlbdqwzZvAz5Y3fka0ccTAUXta7SL64ITr96RIb8PJ4hbL x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: d6fce4a6-25a6-436d-d5bf-08d548e06f15 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(3008031)(2017052603307)(7153060); SRVR:MWHPR1201MB0126; x-ms-traffictypediagnostic: MWHPR1201MB0126: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(767451399110)(217544274631240); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(3231023)(10201501046)(6055026)(6041268)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:MWHPR1201MB0126; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:MWHPR1201MB0126; x-forefront-prvs: 05299D545B x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39380400002)(39860400002)(366004)(396003)(346002)(376002)(13464003)(199004)(189003)(9686003)(6306002)(59450400001)(6246003)(53546011)(3280700002)(6506007)(55016002)(2201001)(2906002)(25786009)(102836004)(53936002)(2501003)(3660700001)(2900100001)(478600001)(14454004)(966005)(72206003)(86362001)(81166006)(97736004)(7736002)(68736007)(33656002)(7696005)(110136005)(76176011)(39060400002)(106356001)(5660300001)(6116002)(3846002)(105586002)(74316002)(305945005)(2950100002)(229853002)(99286004)(77096006)(66066001)(6436002)(81156014)(316002)(8936002)(8676002); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR1201MB0126; H:MWHPR1201MB0127.namprd12.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: d6fce4a6-25a6-436d-d5bf-08d548e06f15 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Dec 2017 02:05:11.4181 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1201MB0126 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 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" X-Virus-Scanned: ClamAV using ClamSMTP Reviewed-by: Roger He -----Original Message----- From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf Of Christian K?nig Sent: Friday, December 22, 2017 2:06 AM To: dri-devel@lists.freedesktop.org; amd-gfx@lists.freedesktop.org Subject: [PATCH] drm/ttm: drop the spin in delayed delete if the trylock doesn't work Thomas actually noticed that, but I didn't realized what he meant until now. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.11.0 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 60bb5c12b568..84dfa2368a72 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -592,6 +592,8 @@ static bool ttm_bo_delayed_delete(struct ttm_bo_device *bdev, bool remove_all) } else if (reservation_object_trylock(bo->resv)) { ttm_bo_cleanup_refs(bo, false, !remove_all, true); + } else { + spin_unlock(&glob->lru_lock); } kref_put(&bo->list_kref, ttm_bo_release_list);