From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from localhost.localdomain (unknown [182.253.183.71]) by gnuweeb.org (Postfix) with ESMTPSA id E618E8061E; Wed, 19 Oct 2022 16:43:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1666197795; bh=pTMjPJ651nrijfGWIUnY+dKzJHvQMLNV/TlCzsMa/XE=; h=From:To:Cc:Subject:Date:From; b=Z6q0+4EwiJIRVfCxBl83vlATJw6Thec21XqAKgNXy5FhTdmwQ4Rm5nSGpgpyw4N51 ERwc/wsNCMLg8NHy9R8U041JHSNQ+KKaRiuSnstr77ZoGtK4/8poStrTzp8xdePdUo bA2phFkhrCepJv+v1fx0C4jTPI5LyHEXpGcdp3gXRwrpZ3CiZeFhbzhJY+mf6jV7CT x+xjX6rVqzzl+KVGEqezzSaIZUFI1CO08YsdtPKEbLqHZ4VjhPQOr5APV0JSdGM33/ qdt1qcCEcFAS+vQ+TYl3gOJPj0kn2eOkgVI+IkRD7Phs9/uA2oVhu/8MPL9CDo0bZF QN8cdpYzUk4Kg== From: Ammar Faizi To: Alviro Iskandar Setiawan Cc: Ammar Faizi , Muhammad Rizki , GNU/Weeb Mailing List Subject: [PATCH ncns v1 0/2] Small optimization and improve debugging experience Date: Wed, 19 Oct 2022 23:43:07 +0700 Message-Id: <20221019164309.1709541-1-ammarfaizi2@gnuweeb.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Hi, There are two patches in this series. The first one is just a small optimization and the second one is a debugging experience improvement. # Patch 1 chnet: Optimize put_thread() path The `delete` call doesn't have to be protected by mutex. Move it to the outside of the locked region to reduce the `put_thread()` critical section time. # Patch 2 chnet: Add thread index specifier for chromium thread Currently, all threads created by the chromium thread pool have task comm name "chromium_thread". This naming is not helpful when we're debugging multiple chromium threads. Set the name to "chromium-%u" where %u is the thread index in the pool. It creates a way to identify each chromium thread uniquely. Please review! Signed-off-by: Ammar Faizi --- Ammar Faizi (2): chnet: Optimize `put_thread()` path chnet: Add thread index specifier for chromium thread chnet/chnet.cc | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) -- Ammar Faizi