From patchwork Mon Aug 5 15:45:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christian_K=C3=B6nig?= X-Patchwork-Id: 11085703 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 66AA91398 for ; Fri, 9 Aug 2019 09:15:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4B3C428B8E for ; Fri, 9 Aug 2019 09:15:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3F15728BB9; Fri, 9 Aug 2019 09:15:59 +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=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable 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 F34DE28B8E for ; Fri, 9 Aug 2019 09:15:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3E1D86ED3E; Fri, 9 Aug 2019 09:15:46 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id 905506E4A5; Mon, 5 Aug 2019 15:45:59 +0000 (UTC) Received: by mail-wr1-x442.google.com with SMTP id x1so35006012wrr.9; Mon, 05 Aug 2019 08:45:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=v306sfwUGIVnriTquF2KCh9r0qG80xENrZcYr3yv41A=; b=p3QdSqp/IZB3BssJZRJDeiseUIkbyEbmHVTChgu8eWbkqg131THLOU5N1osGb4cufE H+B9+t2BnfDCCA2prODnZdBe8C/6MPweeiVcTaMr0wmnBOFiK4XJN9YusWhViUIIbXvM 3i1aMIWDdViu15fONie0+A0QmWi2RG8za6XSkMgLXlr6PJdsa4AxQUunmWSD/B7ESUPn Jk5K3tKoqpqN1tlXBvre3Wol4NvMmVCapBxV24cS2g5jM5JD5+W2zoMmElMZCImz2kld Q0+QgXsBJNnnnk19S9SlLSTZZOphx52Vz9zv4zD2Zfcu/p9JXAK9dIRUhjRvjhXV2Sal S08Q== X-Gm-Message-State: APjAAAUp+7Vj6Me+dbGXQBZcdoG9hEcJrjiAur8dcJES1Yg3oexsNFNI xxcexLxHpjJbN5y3KHN0n4TcYUua X-Google-Smtp-Source: APXvYqyiVh4JW9BAxeQmV7Ga2Y/xwkIkFOdeQDansqXZR5hzlhxtXw4izgVGV95M9bxc9zQCbGMijQ== X-Received: by 2002:a5d:4090:: with SMTP id o16mr6149082wrp.292.1565019958047; Mon, 05 Aug 2019 08:45:58 -0700 (PDT) Received: from abel.fritz.box ([2a02:908:1252:fb60:fdbd:6233:4990:5a8d]) by smtp.gmail.com with ESMTPSA id 91sm171836865wrp.3.2019.08.05.08.45.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Aug 2019 08:45:57 -0700 (PDT) From: " =?utf-8?q?Christian_K=C3=B6nig?= " X-Google-Original-From: =?utf-8?q?Christian_K=C3=B6nig?= To: intel-gfx@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, chris@chris-wilson.co.uk Date: Mon, 5 Aug 2019 17:45:52 +0200 Message-Id: <20190805154554.3476-3-christian.koenig@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190805154554.3476-1-christian.koenig@amd.com> References: <20190805154554.3476-1-christian.koenig@amd.com> MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 09 Aug 2019 09:15:44 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=v306sfwUGIVnriTquF2KCh9r0qG80xENrZcYr3yv41A=; b=RPl/cWr4ICJ1bdX1iZkG7X25CTPpq5Ar/WW0HcJ9gh5rqtkdD6q+0gjm3pYy80LHB7 ELw9Df1MB3ZM5DzXGQtjdAMPwyex8IiqdGKjuXDxFrQJJiog8knuUUCzGlQJkSJcylCN f6E625dTHPgYBXlqgrWGSayMZAOiXy9+KK4OP95Z7YdHJOXPvABdeursdLsGzp/xy5xx GN51bL/l/g3eajCja5cX2Mxp5mshzDQhFo/u1rKNq67lnuK0zeaPUW0EHObGBXr90fte cM1CkFfovDVjZ9WVP3wjmAgeQQhpPI9AXl0WHYSzW8KxOqc2Gwi+OhPu7VHmdfjfoovC YuMQ== Subject: [Intel-gfx] [PATCH 3/5] dma-buf: further relax reservation_object_add_shared_fence X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Other cores don't busy wait any more and we removed the last user of checking the seqno for changes. Drop updating the number for shared fences altogether. Signed-off-by: Christian König --- drivers/dma-buf/reservation.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/dma-buf/reservation.c b/drivers/dma-buf/reservation.c index d59207ca72d2..6eaca469005f 100644 --- a/drivers/dma-buf/reservation.c +++ b/drivers/dma-buf/reservation.c @@ -206,9 +206,6 @@ void reservation_object_add_shared_fence(struct reservation_object *obj, fobj = reservation_object_get_list(obj); count = fobj->shared_count; - preempt_disable(); - write_seqcount_begin(&obj->seq); - for (i = 0; i < count; ++i) { old = rcu_dereference_protected(fobj->shared[i], @@ -226,9 +223,6 @@ void reservation_object_add_shared_fence(struct reservation_object *obj, RCU_INIT_POINTER(fobj->shared[i], fence); /* pointer update must be visible before we extend the shared_count */ smp_store_mb(fobj->shared_count, count); - - write_seqcount_end(&obj->seq); - preempt_enable(); dma_fence_put(old); } EXPORT_SYMBOL(reservation_object_add_shared_fence);