From nobody Thu Feb 12 12:30:48 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 524D917E452 for ; Wed, 12 Jun 2024 14:55:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718204160; cv=none; b=ureF1n/hhNTcLB2EnrA/u06XvdDpXofeIlxc1gWkMPV3W6CMgZqxmC+Cs+YZw6qn3BhXfF12wPnsowrNlNAaFFFre9Vj0Jm+N2yMy89zaYyURfRFkHbtxcShatlrZ0KEdk7EivtSCKPFAsEERffvRWLLkNyvsimPoM5RWxGbuQE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718204160; c=relaxed/simple; bh=ajajUFoE4iRj8fvQD66lEvTBalCU4q4R+oGB47WiF9Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tqJU+A/iv4GcD60B/ClzjbLnwCkKNdU9xWrnfrF54/pKc0MXrnOtjPCGCX1mfRMbJYAgVfbEXMY+CFhdD5xmrElr1zW5fx7aQw1F5iomEcKcx1BRbw6s17VGBjfHW3FfSzkztl0gTKMmzrytSdymXql7za8uoEcXLg1fQ8nvS1E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=R8dt/aTj; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="R8dt/aTj" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718204158; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VwCljioTH7fI0yuPGXTC32Cjw7d1FeSDSirSCWkDLho=; b=R8dt/aTjCWoJs9bOoZTIt78cS0T74LjvgGbVDtddTshSl7zxp0ReZ4PTO1SAmt2/lA9iaN fi+W7g3yPNcsa2YBlp5N6tAf80nMWd24HMQIwqkRYqDdDcofUDTaNPaBhBEkHNy1vRErT+ 3hf2I55Agu4EUxXbX1Wl1AL1SEwwPS4= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-609-O0OCA3rtP2eszQJSmNDeqA-1; Wed, 12 Jun 2024 10:55:55 -0400 X-MC-Unique: O0OCA3rtP2eszQJSmNDeqA-1 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 046E91955E88; Wed, 12 Jun 2024 14:55:54 +0000 (UTC) Received: from fedora.brq.redhat.com (unknown [10.43.17.68]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C12811956087; Wed, 12 Jun 2024 14:55:51 +0000 (UTC) From: tglozar@redhat.com To: bristot@kernel.org, rostedt@goodmis.org Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org, jkacur@redhat.com, jwyatt@redhat.com, Tomas Glozar Subject: [PATCH 1/5] rtla: Add dependency on libcpupower Date: Wed, 12 Jun 2024 16:54:35 +0200 Message-ID: <20240612145439.206990-2-tglozar@redhat.com> In-Reply-To: <20240612145439.206990-1-tglozar@redhat.com> References: <20240612145439.206990-1-tglozar@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 Content-Type: text/plain; charset="utf-8" From: Tomas Glozar Add a test for libcpupower into feature tests and use it to add a dependency on libcpupower to rtla. Signed-off-by: Tomas Glozar --- tools/build/Makefile.feature | 1 + tools/build/feature/Makefile | 4 ++++ tools/build/feature/test-libcpupower.c | 8 ++++++++ tools/tracing/rtla/Makefile | 2 ++ tools/tracing/rtla/Makefile.config | 9 +++++++++ 5 files changed, 24 insertions(+) create mode 100644 tools/build/feature/test-libcpupower.c diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature index 1e2ab148d5db..e4fb0a1fbddf 100644 --- a/tools/build/Makefile.feature +++ b/tools/build/Makefile.feature @@ -53,6 +53,7 @@ FEATURE_TESTS_BASIC :=3D \ libslang-include-subdir \ libtraceevent \ libtracefs \ + libcpupower \ libcrypto \ libunwind \ pthread-attr-setaffinity-np \ diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index ed54cef450f5..c93d62afc1e8 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -38,6 +38,7 @@ FILES=3D \ test-libslang.bin \ test-libslang-include-subdir.bin \ test-libtraceevent.bin \ + test-libcpupower.bin \ test-libtracefs.bin \ test-libcrypto.bin \ test-libunwind.bin \ @@ -212,6 +213,9 @@ $(OUTPUT)test-libslang-include-subdir.bin: $(OUTPUT)test-libtraceevent.bin: $(BUILD) -ltraceevent =20 +$(OUTPUT)test-libcpupower.bin: + $(BUILD) -lcpupower + $(OUTPUT)test-libtracefs.bin: $(BUILD) $(shell $(PKG_CONFIG) --cflags libtraceevent 2>/dev/null) -ltra= cefs =20 diff --git a/tools/build/feature/test-libcpupower.c b/tools/build/feature/t= est-libcpupower.c new file mode 100644 index 000000000000..a346aa332a71 --- /dev/null +++ b/tools/build/feature/test-libcpupower.c @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0 +#include + +int main(void) +{ + int rv =3D cpuidle_state_count(0); + return rv; +} diff --git a/tools/tracing/rtla/Makefile b/tools/tracing/rtla/Makefile index b5878be36125..a6a7dee16622 100644 --- a/tools/tracing/rtla/Makefile +++ b/tools/tracing/rtla/Makefile @@ -32,8 +32,10 @@ DOCSRC :=3D ../../../Documentation/tools/rtla/ =20 FEATURE_TESTS :=3D libtraceevent FEATURE_TESTS +=3D libtracefs +FEATURE_TESTS +=3D libcpupower FEATURE_DISPLAY :=3D libtraceevent FEATURE_DISPLAY +=3D libtracefs +FEATURE_DISPLAY +=3D libcpupower =20 ifeq ($(V),1) Q =3D diff --git a/tools/tracing/rtla/Makefile.config b/tools/tracing/rtla/Makefi= le.config index 0b7ecfb30d19..8b6bc91e5dff 100644 --- a/tools/tracing/rtla/Makefile.config +++ b/tools/tracing/rtla/Makefile.config @@ -42,6 +42,15 @@ else $(info libtracefs is missing. Please install libtracefs-dev/libtracefs-d= evel) endif =20 +$(call feature_check,libcpupower) +ifeq ($(feature-libcpupower), 1) + $(call detected,CONFIG_LIBCPUPOWER) + $(call lib_setup,cpupower) +else + STOP_ERROR :=3D 1 + $(info libcpupower is missing. Please install libcpupower-dev/kernel-too= ls-libs-devel) +endif + ifeq ($(STOP_ERROR),1) $(error Please, check the errors above.) endif --=20 2.43.0 From nobody Thu Feb 12 12:30:48 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C529017F4F4 for ; Wed, 12 Jun 2024 14:56:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718204162; cv=none; b=V/mL19gAPInInB2o+flyt2poa70NkRlaqHk6eJUFPlsDpUjXevklWjYCS6qW9CspOrafdr09FqtD8b66FThZP1EJQvcA7EuSMPV07S7uQc8a+Aov46Hpm2PnPy6gN6Q4MmPcJKtaRklNyKW4vbjSfX02g1ZlPEqsBHXcbCaz+gA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718204162; c=relaxed/simple; bh=cJUXunAqIxilQZmNC5/bPQJRP2yY+mwrA9Z610+q4z0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KkWzcoSZjVl1bkdXom+Oh9w8Uq4SaG4TNvkT13YZmpwUX0yKt3jRUDpk99zcpnim9bno8WsDu6oi+Gym2TkaKpBp2PH2L9gKowxdjI3fQQ0QLGJ14dJ6bF4kjJS6Ch8z70w5FhIcUx0o9dCYKz4acqolt0uMREElIA6VeUNg7g8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Kk1bJ282; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Kk1bJ282" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718204159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6tFx/qXVo6O1Pq7NugdqAhdDFg17/I3UZeqAqLRYlrw=; b=Kk1bJ2826QUb5/WaQQTBEVOd9uQSf7p0x0Ht2QiKjhyr54TUaPU3440wxVDE/MJZkjt06/ bFoJ9s0bWWa0/osz9LtmEoH+CzPsQO3xbqu4+H56Gx7J5ktQQWtT5f75REvjm8Q8kT/tLW mPCkliynJvxVHxMkC1vfQZ4IdOeNtbw= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-376-4mOH9h5IPVaP7ddRIxOVcQ-1; Wed, 12 Jun 2024 10:55:57 -0400 X-MC-Unique: 4mOH9h5IPVaP7ddRIxOVcQ-1 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8C2B71955E7F; Wed, 12 Jun 2024 14:55:56 +0000 (UTC) Received: from fedora.brq.redhat.com (unknown [10.43.17.68]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 65C591954AC0; Wed, 12 Jun 2024 14:55:54 +0000 (UTC) From: tglozar@redhat.com To: bristot@kernel.org, rostedt@goodmis.org Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org, jkacur@redhat.com, jwyatt@redhat.com, Tomas Glozar Subject: [PATCH 2/5] rtla/utils: Add idle state disabling via libcpupower Date: Wed, 12 Jun 2024 16:54:36 +0200 Message-ID: <20240612145439.206990-3-tglozar@redhat.com> In-Reply-To: <20240612145439.206990-1-tglozar@redhat.com> References: <20240612145439.206990-1-tglozar@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 Content-Type: text/plain; charset="utf-8" From: Tomas Glozar Add functions to utils.c to disable idle states through functions of libcpupower. This will serve as the basis for disabling idle states per cpu when running timerlat. Signed-off-by: Tomas Glozar --- tools/tracing/rtla/src/utils.c | 133 +++++++++++++++++++++++++++++++++ tools/tracing/rtla/src/utils.h | 4 + 2 files changed, 137 insertions(+) diff --git a/tools/tracing/rtla/src/utils.c b/tools/tracing/rtla/src/utils.c index 9ac71a66840c..638c50f0f88e 100644 --- a/tools/tracing/rtla/src/utils.c +++ b/tools/tracing/rtla/src/utils.c @@ -4,6 +4,7 @@ */ =20 #define _GNU_SOURCE +#include #include #include #include @@ -519,6 +520,138 @@ int set_cpu_dma_latency(int32_t latency) return fd; } =20 +static unsigned int **saved_cpu_idle_disable_state; +static size_t saved_cpu_idle_disable_state_alloc_ctr; + +/* + * save_cpu_idle_state_disable - save disable for all idle states of a cpu + * + * Saves the current disable of all idle states of a cpu, to be subsequent= ly + * restored via restore_cpu_idle_disable_state. + * + * Return: idle state count on success, negative on error + */ +int save_cpu_idle_disable_state(unsigned int cpu) +{ + unsigned int nr_states; + unsigned int state; + int disabled; + int nr_cpus; + + nr_states =3D cpuidle_state_count(cpu); + + if (nr_states =3D=3D 0) + return 0; + + if (saved_cpu_idle_disable_state =3D=3D NULL) { + nr_cpus =3D sysconf(_SC_NPROCESSORS_CONF); + saved_cpu_idle_disable_state =3D calloc(nr_cpus, sizeof(unsigned int *)); + } + + saved_cpu_idle_disable_state[cpu] =3D calloc(nr_states, sizeof(unsigned i= nt)); + saved_cpu_idle_disable_state_alloc_ctr++; + + for (state =3D 0; state < nr_states; state++) { + disabled =3D cpuidle_is_state_disabled(cpu, state); + if (disabled < 0) + return disabled; + saved_cpu_idle_disable_state[cpu][state] =3D disabled; + } + + return nr_states; +} + +/* + * restore_cpu_idle_disable_state - restore disable for all idle states of= a cpu + * + * Restores the current disable state of all idle states of a cpu that was + * previously saved by save_cpu_idle_disable_state. + * + * Return: idle state count on success, negative on error + */ +int restore_cpu_idle_disable_state(unsigned int cpu) +{ + unsigned int nr_states; + unsigned int state; + int disabled; + int result; + + nr_states =3D cpuidle_state_count(cpu); + + if (nr_states =3D=3D 0) + return 0; + + for (state =3D 0; state < nr_states; state++) { + disabled =3D saved_cpu_idle_disable_state[cpu][state]; + result =3D cpuidle_state_disable(cpu, state, disabled); + if (result < 0) + return result; + } + + free(saved_cpu_idle_disable_state[cpu]); + saved_cpu_idle_disable_state[cpu] =3D NULL; + saved_cpu_idle_disable_state_alloc_ctr--; + if (saved_cpu_idle_disable_state_alloc_ctr =3D=3D 0) { + free(saved_cpu_idle_disable_state); + saved_cpu_idle_disable_state =3D NULL; + } + + return nr_states; +} + +/* + * free_cpu_idle_disable_states - free saved idle state disable for all cp= us + * + * Frees the memory used for storing cpu idle state disable for all cpus + * and states. + * + * Normally, the memory is freed automatically in + * restore_cpu_idle_disable_state; this is mostly for cleaning up after an + * error. + */ +void free_cpu_idle_disable_states(void) +{ + int cpu; + + if (!saved_cpu_idle_disable_state) + return; + + for (cpu =3D 0; cpu < sysconf(_SC_NPROCESSORS_CONF); cpu++) { + if (!saved_cpu_idle_disable_state[cpu]) + continue; + free(saved_cpu_idle_disable_state[cpu]); + saved_cpu_idle_disable_state[cpu] =3D NULL; + } + + free(saved_cpu_idle_disable_state); + saved_cpu_idle_disable_state =3D NULL; +} + +/* + * set_cpu_idle_disable_state - set disable for all idle states of a cpu + * + * This is used to reduce the exit from idle latency. Unlike + * set_cpu_dma_latency, it can disable idle states per cpu. + * + * Return: idle state count on success, negative on error + */ +int set_cpu_idle_disable_state(unsigned int cpu, unsigned int disable) +{ + unsigned int nr_states; + unsigned int state; + int result; + + nr_states =3D cpuidle_state_count(cpu); + + for (state =3D 0; state < nr_states; state++) { + result =3D cpuidle_state_disable(cpu, state, disable); + if (result < 0) + return result; + } + + return nr_states; +} + #define _STR(x) #x #define STR(x) _STR(x) =20 diff --git a/tools/tracing/rtla/src/utils.h b/tools/tracing/rtla/src/utils.h index d44513e6c66a..b310ed5cd867 100644 --- a/tools/tracing/rtla/src/utils.h +++ b/tools/tracing/rtla/src/utils.h @@ -64,6 +64,10 @@ int set_comm_sched_attr(const char *comm_prefix, struct = sched_attr *attr); int set_comm_cgroup(const char *comm_prefix, const char *cgroup); int set_pid_cgroup(pid_t pid, const char *cgroup); int set_cpu_dma_latency(int32_t latency); +int save_cpu_idle_disable_state(unsigned int cpu); +int restore_cpu_idle_disable_state(unsigned int cpu); +void free_cpu_idle_disable_states(void); +int set_cpu_idle_disable_state(unsigned int cpu, unsigned int disable); int auto_house_keeping(cpu_set_t *monitored_cpus); =20 #define ns_to_usf(x) (((double)x/1000)) --=20 2.43.0 From nobody Thu Feb 12 12:30:48 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5E1E917FAD0 for ; Wed, 12 Jun 2024 14:56:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718204167; cv=none; b=S3WiW5ZLCcdzGIoDxryQrDn8QfvhkMMr316IU5zCj4jeK3sVsWw7EpGPoeotDMMq7IuzG953E6vPxf4qyD1pHn1ZF9byk7wEYF39VXoM9fw4Wt8CXnJuKVvp9YMqkNnLAH+36qDX5TweptAwEpSZk6cPAhQp+cUH8T5n6xU4bXg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718204167; c=relaxed/simple; bh=ak0D1RyKjNQbr1Wgva/mn4SWVkmIAoC+xSn8Iu47Vhs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MuaCRAi9EREqiT4cDUBBttQMlwAYNSn7VWUT/OVp9EWN36adhqYQRujYGlHAUKh+GPpqCnFCp5fsBOV0i0cVq2RphRO1YoKQ0EZVOS4wG3x6dmtcU0RZf26gDQz7SiIETRwzCPpLx5UlGrhcgOAKrTvcW5RYyFvT2YcTSY96PO8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=DGarEA54; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="DGarEA54" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718204165; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8Ni7sEvqwYy/qdng9JHhwxqL5eMcqZfuwVc8G8BHbZc=; b=DGarEA54hKBoK9eavV0PurspE0drf3o49Yq+dZaxeTGI+TbEch8j6fOGWTt5Mpn7Or2ewF xwEPk+HXmSIXhHXG5mVaf8SKHjiI/BX6K+q8ONQMFzqXx9a4YtWpCWO8zkuQGWAGaoTv2V 1uhaIERJtuadjeASFGj27ck5NOj+Pvk= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-271-NRQKEMsZNjWcjWauwEknCg-1; Wed, 12 Jun 2024 10:56:00 -0400 X-MC-Unique: NRQKEMsZNjWcjWauwEknCg-1 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 190F9195607C; Wed, 12 Jun 2024 14:55:59 +0000 (UTC) Received: from fedora.brq.redhat.com (unknown [10.43.17.68]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id ED8321956087; Wed, 12 Jun 2024 14:55:56 +0000 (UTC) From: tglozar@redhat.com To: bristot@kernel.org, rostedt@goodmis.org Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org, jkacur@redhat.com, jwyatt@redhat.com, Tomas Glozar Subject: [PATCH 3/5] rtla/timerlat: Add --disable-idle-states for top Date: Wed, 12 Jun 2024 16:54:37 +0200 Message-ID: <20240612145439.206990-4-tglozar@redhat.com> In-Reply-To: <20240612145439.206990-1-tglozar@redhat.com> References: <20240612145439.206990-1-tglozar@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 Content-Type: text/plain; charset="utf-8" From: Tomas Glozar Add option to disable idle states on CPUs where timerlat is running for the duration of the workload. Signed-off-by: Tomas Glozar --- tools/tracing/rtla/src/timerlat_top.c | 35 ++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/tools/tracing/rtla/src/timerlat_top.c b/tools/tracing/rtla/src= /timerlat_top.c index 8c16419fe22a..dd1e5b03d781 100644 --- a/tools/tracing/rtla/src/timerlat_top.c +++ b/tools/tracing/rtla/src/timerlat_top.c @@ -48,6 +48,7 @@ struct timerlat_top_params { int pretty_output; int warmup; int buffer_size; + int disable_idle_states; cpu_set_t hk_cpu_set; struct sched_attr sched_param; struct trace_events *events; @@ -447,7 +448,7 @@ static void timerlat_top_usage(char *usage) "", " usage: rtla timerlat [top] [-h] [-q] [-a us] [-d s] [-D] [-n] [-p us]= [-i us] [-T us] [-s us] \\", " [[-t[file]] [-e sys[:event]] [--filter ] [--trigger ] [-c cpu-list] [-H cpu-list]\\", - " [-P priority] [--dma-latency us] [--aa-only us] [-C[=3Dcgroup_name]]= [-u|-k] [--warm-up s]", + " [-P priority] [--dma-latency us] [--aa-only us] [-C[=3Dcgroup_name]]= [-u|-k] [--warm-up s] [--disable-idle-states]", "", " -h/--help: print this menu", " -a/--auto: set automatic trace mode, stopping the session if argumen= t in us latency is hit", @@ -481,6 +482,7 @@ static void timerlat_top_usage(char *usage) " -U/--user-load: enable timerlat for user-defined user-space workload= ", " --warm-up s: let the workload run for s seconds before collecting= data", " --trace-buffer-size kB: set the per-cpu trace buffer size in kB", + " --disable-idle-states: disable all idle states for cpus used by t= imerlat to reduce exit from idle latency", NULL, }; =20 @@ -518,6 +520,9 @@ static struct timerlat_top_params /* disabled by default */ params->dma_latency =3D -1; =20 + /* disabled by default */ + params->disable_idle_states =3D 0; + /* display data in microseconds */ params->output_divisor =3D 1000; =20 @@ -550,6 +555,7 @@ static struct timerlat_top_params {"aa-only", required_argument, 0, '5'}, {"warm-up", required_argument, 0, '6'}, {"trace-buffer-size", required_argument, 0, '7'}, + {"disable-idle-states", no_argument, 0, '8'}, {0, 0, 0, 0} }; =20 @@ -726,6 +732,9 @@ static struct timerlat_top_params case '7': params->buffer_size =3D get_llong_from_str(optarg); break; + case '8': + params->disable_idle_states =3D 1; + break; default: timerlat_top_usage("Invalid option"); } @@ -922,6 +931,7 @@ int timerlat_top_main(int argc, char *argv[]) int return_value =3D 1; char *max_lat; int retval; + int i; =20 params =3D timerlat_top_parse_args(argc, argv); if (!params) @@ -971,6 +981,21 @@ int timerlat_top_main(int argc, char *argv[]) } } =20 + if (params->disable_idle_states) { + for (i =3D 0; i < sysconf(_SC_NPROCESSORS_CONF); i++) { + if (params->cpus && !CPU_ISSET(i, ¶ms->monitored_cpus)) + continue; + if (save_cpu_idle_disable_state(i) < 0) { + err_msg("Could not save cpu idle state.\n"); + goto out_free; + } + if (set_cpu_idle_disable_state(i, 1) < 0) { + err_msg("Could not disable cpu idle state.\n"); + goto out_free; + } + } + } + if (params->trace_output) { record =3D osnoise_init_trace_tool("timerlat"); if (!record) { @@ -1125,6 +1150,13 @@ int timerlat_top_main(int argc, char *argv[]) timerlat_aa_destroy(); if (dma_latency_fd >=3D 0) close(dma_latency_fd); + if (params->disable_idle_states) { + for (i =3D 0; i < sysconf(_SC_NPROCESSORS_CONF); i++) { + if (params->cpus && !CPU_ISSET(i, ¶ms->monitored_cpus)) + continue; + restore_cpu_idle_disable_state(i); + } + } trace_events_destroy(&record->trace, params->events); params->events =3D NULL; out_free: @@ -1134,6 +1166,7 @@ int timerlat_top_main(int argc, char *argv[]) osnoise_destroy_tool(record); osnoise_destroy_tool(top); free(params); + free_cpu_idle_disable_states(); out_exit: exit(return_value); } --=20 2.43.0 From nobody Thu Feb 12 12:30:48 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0542F17FAC9 for ; Wed, 12 Jun 2024 14:56:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718204166; cv=none; b=Bzf1MGjk94t7YnEmbC0/drorgulsh37AL5UziWP8x6QzWnwF+j455ClsQ7OYpum4rC39/nJJwksr95eufqIPjJPQACvzb/HKc+50MQSFEoGCiWD6mIx6ns01r6liz3RcAum+bsZzG1ypp6PZyCdPUXVaA+J6ccWpLungqZrm54g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718204166; c=relaxed/simple; bh=DcrBBI0AkLK0hHCnSouBZza5ncgd/m5D6aKcmbPC2JA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QLguBaOc/T4Rxp6XQyq+7TL99fzWxgYkcYAqCOfJAg+B7zx8Il7RLmM1BxOXoEJgUaL/Q+v5elPLpyTeXZ2+o678O8hyTRtqiLqgxvRhGeLUo3juPpyXNw/tfgSlwolZ5XWRfCPO1+EpH1wayA2pTMMi2LCwhocTXIoAE3JMZNI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=R3qRHcyU; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="R3qRHcyU" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718204164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zyKxSiReGAzS1f+PvDOw58WbPsYDECO0YwUHLpbFRrw=; b=R3qRHcyU5X23nFW7ymUearOHZ02OoJApzYyn0sADnhhiPustGLijgZkJJtdrtsaA5SKceF vNF//hWYuF8Sj29WW2Gmmmmgj7fzMWFbg7jHsM6CNf7yu/6sr/tImQrDq0i5U4lgh2Sg4+ nHqlMFUCQKALhwAgC1/qjWa2Bq+ixMI= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-503-vHB95_DONhivEPToB721jA-1; Wed, 12 Jun 2024 10:56:02 -0400 X-MC-Unique: vHB95_DONhivEPToB721jA-1 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A36B51955D9F; Wed, 12 Jun 2024 14:56:01 +0000 (UTC) Received: from fedora.brq.redhat.com (unknown [10.43.17.68]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7A0D51955E91; Wed, 12 Jun 2024 14:55:59 +0000 (UTC) From: tglozar@redhat.com To: bristot@kernel.org, rostedt@goodmis.org Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org, jkacur@redhat.com, jwyatt@redhat.com, Tomas Glozar Subject: [PATCH 4/5] rtla/timerlat: Add --disable-idle-states for hist Date: Wed, 12 Jun 2024 16:54:38 +0200 Message-ID: <20240612145439.206990-5-tglozar@redhat.com> In-Reply-To: <20240612145439.206990-1-tglozar@redhat.com> References: <20240612145439.206990-1-tglozar@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 Content-Type: text/plain; charset="utf-8" From: Tomas Glozar Support disabling idle states also for timerlat-hist. Signed-off-by: Tomas Glozar --- tools/tracing/rtla/src/timerlat_hist.c | 35 +++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/tools/tracing/rtla/src/timerlat_hist.c b/tools/tracing/rtla/sr= c/timerlat_hist.c index a3907c390d67..69d427841d14 100644 --- a/tools/tracing/rtla/src/timerlat_hist.c +++ b/tools/tracing/rtla/src/timerlat_hist.c @@ -55,6 +55,7 @@ struct timerlat_hist_params { int entries; int warmup; int buffer_size; + int disable_idle_states; }; =20 struct timerlat_hist_cpu { @@ -655,7 +656,7 @@ static void timerlat_hist_usage(char *usage) " [-t[file]] [-e sys[:event]] [--filter ] [--trigger ] [-c cpu-list] [-H cpu-list]\\", " [-P priority] [-E N] [-b N] [--no-irq] [--no-thread] [--no-header] [= --no-summary] \\", " [--no-index] [--with-zeros] [--dma-latency us] [-C[=3Dcgroup_name]] = [--no-aa] [--dump-task] [-u|-k]", - " [--warm-up s]", + " [--warm-up s] [--disable-idle-states]", "", " -h/--help: print this menu", " -a/--auto: set automatic trace mode, stopping the session if argumen= t in us latency is hit", @@ -695,6 +696,7 @@ static void timerlat_hist_usage(char *usage) " -U/--user-load: enable timerlat for user-defined user-space workload= ", " --warm-up s: let the workload run for s seconds before collecting= data", " --trace-buffer-size kB: set the per-cpu trace buffer size in kB", + " --disable-idle-states: disable all idle states for cpus used by t= imerlat to reduce exit from idle latency", NULL, }; =20 @@ -732,6 +734,9 @@ static struct timerlat_hist_params /* disabled by default */ params->dma_latency =3D -1; =20 + /* disabled by default */ + params->disable_idle_states =3D 0; + /* display data in microseconds */ params->output_divisor =3D 1000; params->bucket_size =3D 1; @@ -772,6 +777,7 @@ static struct timerlat_hist_params {"dump-task", no_argument, 0, '\1'}, {"warm-up", required_argument, 0, '\2'}, {"trace-buffer-size", required_argument, 0, '\3'}, + {"disable-idle-states", no_argument, 0, '\4'}, {0, 0, 0, 0} }; =20 @@ -960,6 +966,9 @@ static struct timerlat_hist_params case '\3': params->buffer_size =3D get_llong_from_str(optarg); break; + case '\4': + params->disable_idle_states =3D 1; + break; default: timerlat_hist_usage("Invalid option"); } @@ -1152,6 +1161,7 @@ int timerlat_hist_main(int argc, char *argv[]) int return_value =3D 1; pthread_t timerlat_u; int retval; + int i; =20 params =3D timerlat_hist_parse_args(argc, argv); if (!params) @@ -1201,6 +1211,21 @@ int timerlat_hist_main(int argc, char *argv[]) } } =20 + if (params->disable_idle_states) { + for (i =3D 0; i < sysconf(_SC_NPROCESSORS_CONF); i++) { + if (params->cpus && !CPU_ISSET(i, ¶ms->monitored_cpus)) + continue; + if (save_cpu_idle_disable_state(i) < 0) { + err_msg("Could not save cpu idle state.\n"); + goto out_free; + } + if (set_cpu_idle_disable_state(i, 1) < 0) { + err_msg("Could not disable cpu idle state.\n"); + goto out_free; + } + } + } + if (params->trace_output) { record =3D osnoise_init_trace_tool("timerlat"); if (!record) { @@ -1332,6 +1357,13 @@ int timerlat_hist_main(int argc, char *argv[]) timerlat_aa_destroy(); if (dma_latency_fd >=3D 0) close(dma_latency_fd); + if (params->disable_idle_states) { + for (i =3D 0; i < sysconf(_SC_NPROCESSORS_CONF); i++) { + if (params->cpus && !CPU_ISSET(i, ¶ms->monitored_cpus)) + continue; + restore_cpu_idle_disable_state(i); + } + } trace_events_destroy(&record->trace, params->events); params->events =3D NULL; out_free: @@ -1340,6 +1372,7 @@ int timerlat_hist_main(int argc, char *argv[]) osnoise_destroy_tool(record); osnoise_destroy_tool(tool); free(params); + free_cpu_idle_disable_states(); out_exit: exit(return_value); } --=20 2.43.0 From nobody Thu Feb 12 12:30:48 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0822317FADF for ; Wed, 12 Jun 2024 14:56:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718204169; cv=none; b=hlprQF5FpzrWO07ZzFC1uObZrhleAmkOtHb/H/LV+ZllcLQ1JweSXDHITHULL2H/CRF86Y6QOGtIcMvNZIbBW/ZRxoPBAdyR6KAEWIlnKdv/IKMEBVGlMDfOBCx9cTIFkzqhZnmQZj+ZgACfP+2nv7MrG/xJAcvSh6IwDW/GIds= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718204169; c=relaxed/simple; bh=IIcVdAqmaOW8pjieI7wldk6Uea4Gpi3604HhIUuqmbo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GNH2F/trPE+ARMoxmWZFCiiLXT5PRES+lMSTgYETsqUn7hYtH6eeiYyBiduKJsoMjkheseXuhpcyj+PMJ7nkGC5MqIf+Z1fvAoAyLXgmEOC8xo5e2KU3Ew+wSheTORR4L0pyQwTZaAnALYafRy0jyr+MYKiO4Lgl4GRUIIWK/uk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=VicfPlrA; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="VicfPlrA" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718204167; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wJUNan0C2AlKgNFgffgh9zDoO6nSF+BoZ31Zaf+PwhE=; b=VicfPlrAvnW08saPlwEVeYevSAcSF91LtNzswnjYginQI/ZXno1VQR/t6SPEp0S9qaPSY8 49cCqpMHRoJJTovLX+uSGXA4RtTWovBQaoSOsmmR8XAvEZe5GFTMPSCMqTYBBIK4GxM7yI 1AsOX0XH39QYThB1todV87EWlVgBpj8= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-218-DO1enfHbPo-fesQIQwjLBw-1; Wed, 12 Jun 2024 10:56:05 -0400 X-MC-Unique: DO1enfHbPo-fesQIQwjLBw-1 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 45CFF19560BE; Wed, 12 Jun 2024 14:56:04 +0000 (UTC) Received: from fedora.brq.redhat.com (unknown [10.43.17.68]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1F19F1954AC0; Wed, 12 Jun 2024 14:56:01 +0000 (UTC) From: tglozar@redhat.com To: bristot@kernel.org, rostedt@goodmis.org Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org, jkacur@redhat.com, jwyatt@redhat.com, Tomas Glozar Subject: [PATCH 5/5] rtla: Documentation: Add --disable-idle-states Date: Wed, 12 Jun 2024 16:54:39 +0200 Message-ID: <20240612145439.206990-6-tglozar@redhat.com> In-Reply-To: <20240612145439.206990-1-tglozar@redhat.com> References: <20240612145439.206990-1-tglozar@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 Content-Type: text/plain; charset="utf-8" From: Tomas Glozar Add --disable-idle-states to manpage and mention libcpupower dependency in README.txt. Signed-off-by: Tomas Glozar --- Documentation/tools/rtla/common_timerlat_options.rst | 6 ++++++ tools/tracing/rtla/README.txt | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/Documentation/tools/rtla/common_timerlat_options.rst b/Documen= tation/tools/rtla/common_timerlat_options.rst index cef6651f1435..7429e77f95ca 100644 --- a/Documentation/tools/rtla/common_timerlat_options.rst +++ b/Documentation/tools/rtla/common_timerlat_options.rst @@ -31,6 +31,12 @@ *cyclictest* sets this value to *0* by default, use **--dma-latenc= y** *0* to have similar results. =20 +**--disable-idle-states** + Set the /sys/devices/system/cpu/cpu/cpuidle/state*/disable file= s to 1 for cpus + that are running timerlat threads to avoid exit from idle latencie= s. On exit from + timerlat, the state*/disable setting is restored to its original v= alue before + running timerlat. + **-k**, **--kernel-threads** =20 Use timerlat kernel-space threads, in contrast of **-u**. diff --git a/tools/tracing/rtla/README.txt b/tools/tracing/rtla/README.txt index 4af3fd40f171..6617b9911c81 100644 --- a/tools/tracing/rtla/README.txt +++ b/tools/tracing/rtla/README.txt @@ -11,6 +11,7 @@ RTLA depends on the following libraries and tools: =20 - libtracefs - libtraceevent + - libcpupower =20 It also depends on python3-docutils to compile man pages. =20 @@ -26,6 +27,9 @@ For development, we suggest the following steps for compi= ling rtla: $ make $ sudo make install $ cd .. + $ cd $libcpupower_src + $ make + $ sudo make install $ cd $rtla_src $ make $ sudo make install --=20 2.43.0