From patchwork Mon Oct 4 01:37:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Han Zhou X-Patchwork-Id: 1535897 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HN3J40p2Fz9t0J for ; Mon, 4 Oct 2021 12:37:55 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 75FBC415BA; Mon, 4 Oct 2021 01:37:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ygJg3OCb_E6h; Mon, 4 Oct 2021 01:37:51 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp4.osuosl.org (Postfix) with ESMTPS id B11F940725; Mon, 4 Oct 2021 01:37:50 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id D805BC0024; Mon, 4 Oct 2021 01:37:48 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id F39B4C000F for ; Mon, 4 Oct 2021 01:37:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id DCFD060AFE for ; Mon, 4 Oct 2021 01:37:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zjrXGLvOCZea for ; Mon, 4 Oct 2021 01:37:46 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by smtp3.osuosl.org (Postfix) with ESMTPS id 1628660ADB for ; Mon, 4 Oct 2021 01:37:45 +0000 (UTC) Received: (Authenticated sender: hzhou@ovn.org) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 42870FF804; Mon, 4 Oct 2021 01:37:42 +0000 (UTC) From: Han Zhou To: dev@openvswitch.org Date: Sun, 3 Oct 2021 18:37:33 -0700 Message-Id: <20211004013733.700795-2-hzhou@ovn.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211004013733.700795-1-hzhou@ovn.org> References: <20211004013733.700795-1-hzhou@ovn.org> MIME-Version: 1.0 Cc: Anton Ivanov Subject: [ovs-dev] [PATCH ovn 2/2] ovn-parallel-hmap: Remove the unused mutex in worker_control. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" It is not used, and seems not going to be needed, so remove it. Signed-off-by: Han Zhou --- lib/ovn-parallel-hmap.c | 1 - lib/ovn-parallel-hmap.h | 1 - 2 files changed, 2 deletions(-) diff --git a/lib/ovn-parallel-hmap.c b/lib/ovn-parallel-hmap.c index b8c7ac786..3c9f3a0ff 100644 --- a/lib/ovn-parallel-hmap.c +++ b/lib/ovn-parallel-hmap.c @@ -132,7 +132,6 @@ ovn_add_worker_pool(void *(*start)(void *)) new_control->id = i; new_control->done = new_pool->done; new_control->data = NULL; - ovs_mutex_init(&new_control->mutex); new_control->finished = ATOMIC_VAR_INIT(false); sprintf(sem_name, WORKER_SEM_NAME, sembase, new_pool, i); new_control->fire = sem_open(sem_name, O_CREAT, S_IRWXU, 0); diff --git a/lib/ovn-parallel-hmap.h b/lib/ovn-parallel-hmap.h index 897208ef8..f3cd7a210 100644 --- a/lib/ovn-parallel-hmap.h +++ b/lib/ovn-parallel-hmap.h @@ -79,7 +79,6 @@ struct worker_control { atomic_bool finished; /* Set to true after achunk of work is complete. */ sem_t *fire; /* Work start semaphore - sem_post starts the worker. */ sem_t *done; /* Work completion semaphore - sem_post on completion. */ - struct ovs_mutex mutex; /* Guards the data. */ void *data; /* Pointer to data to be processed. */ void *workload; /* back-pointer to the worker pool structure. */ pthread_t worker;