From patchwork Wed Aug 7 13:54:05 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: 11085859 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 2ECDA14F7 for ; Fri, 9 Aug 2019 09:17:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1F7E728BBC for ; Fri, 9 Aug 2019 09:17:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 13B2D28C3E; Fri, 9 Aug 2019 09:17:23 +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 CAF3728BBC for ; Fri, 9 Aug 2019 09:17:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A2C436EDB9; Fri, 9 Aug 2019 09:16:23 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by gabe.freedesktop.org (Postfix) with ESMTPS id 72D9D6E6EE; Wed, 7 Aug 2019 13:54:08 +0000 (UTC) Received: by mail-wm1-x341.google.com with SMTP id s3so142967wms.2; Wed, 07 Aug 2019 06:54:08 -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:mime-version :content-transfer-encoding; bh=UHavv916lCJg3UwiviOVhG8s4PuTXTB/08YllDykGXs=; b=naz4YF2la/xAuf9XTxz+QL9K9kd59GCgogX2OE1WZXSHdVFmXalsjXoWdkFOsr/ILY XmzWowBxuHS0mEXOfkPVlscE7tIfj84hJFz9OWiD0gTgXQ+JNp4bOXA0vE3AiR0VNFOn ptqWo8KcAJr3pu1Hlo1sHpxie1hhHLftqCER+TmXQv7RLHxMWgfsGMJ78aDwgUqISltj cMb+ux2HYzKpJB6/J5VBVsOZ+fae1xEXmqX8ZDQVavuVT7/TgQ6JWnloarWYDfjI4AEM dkLnvYjKKcETbRyIh/tpwNWVnUejdXETgX0Hc77/d4OSa68PwljOtRrgJY3x2JnbIOfu CnWA== X-Gm-Message-State: APjAAAWs1n/OFWAvpNLGvdot+sng+SYMenENybaWVnDKLvaU2RH/9yTF DWHWHc0jVlhqhUUfpWfRHqOO9Peo X-Google-Smtp-Source: APXvYqyAw9zyxdJYItG/T6o5sZ3K8SxDYuw0C50draZ0SR54F9UscnMG3+RU369WMIN/JiJtm/zzFg== X-Received: by 2002:a1c:4087:: with SMTP id n129mr98012wma.3.1565186046894; Wed, 07 Aug 2019 06:54:06 -0700 (PDT) Received: from abel.fritz.box ([2a02:908:1252:fb60:645a:5b76:280d:27be]) by smtp.gmail.com with ESMTPSA id a6sm86308wmj.15.2019.08.07.06.54.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Aug 2019 06:54:06 -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, chris@chris-wilson.co.uk Date: Wed, 7 Aug 2019 15:54:05 +0200 Message-Id: <20190807135405.2036-1-christian.koenig@amd.com> X-Mailer: git-send-email 2.17.1 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:mime-version :content-transfer-encoding; bh=UHavv916lCJg3UwiviOVhG8s4PuTXTB/08YllDykGXs=; b=NcNSeHKjIR6371EuEQsaOxJV5lSqhb+TBw5RI0cPEVlqqQnKsOek2rVlqRBgRghbVc R1K5sjNNHyca+TxWjE4yKnBA0HwzxAvoHgmJ/XOlLbI3KKHFHzMigWJODchg1OudRFHm P5LjQVRBYLNO1J1EELhNAnZ8M703JqCih55lgHkE9Omfg+3x6xbZ9M0HHOxQ35DTzyJr Qc78GNetj4yA3NvsDE13P9wnc4G6ghuI0r3E86NgtS/sO/Z/GMO9An+OEkGIej2yf2Bu XEEltWDqhkRKvC8S7M76veFm9ncpTP8HfFGcT4Ce7sw74OVDmjYFWSxfNZCR3Rk9LMYn MflQ== Subject: [Intel-gfx] [PATCH] dma-buf: make dma_fence structure a bit smaller 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 The ruc and cb_list are never used at the same time. This smal change is actually making the structure 16% smaller. Signed-off-by: Christian König --- include/linux/dma-fence.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/linux/dma-fence.h b/include/linux/dma-fence.h index 05d29dbc7e62..3985c72cd0c2 100644 --- a/include/linux/dma-fence.h +++ b/include/linux/dma-fence.h @@ -65,8 +65,10 @@ struct dma_fence_cb; struct dma_fence { struct kref refcount; const struct dma_fence_ops *ops; - struct rcu_head rcu; - struct list_head cb_list; + union { + struct rcu_head rcu; + struct list_head cb_list; + }; spinlock_t *lock; u64 context; u64 seqno;