From mboxrd@z Thu Jan 1 00:00:00 1970 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 4084F39B944 for ; Mon, 30 Mar 2026 19:43:40 +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=1774899822; cv=none; b=Zdp7UnqHJjK5PoHgrxt0mopqI3C/5+QQuNlAlHwLu5FkEuAgEvxD6vZsgcDqxiC1FRXg152BSjsYajzZcFgHpc2TY9etKWzlcji4r75cOcnMbl+4MBttZYB6tfNPk37FL1Knhfgs+DbHQZ1IGT/Es7QkFZLTh30s/lcsLDQeblM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774899822; c=relaxed/simple; bh=mxGaNzaosEHbRXW9HiA1U8pspC1epujU+CcIt7Dqkrg=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=r9sJ0pcNlhje3c3xtnuetE5coMBEqkpz4NON8tWo+RDaDPBoyMVpPiSql56jZ+sYew4FTWp8TuHLgU9/HsC1uwwGnzWxwReM7SzW1McHiUD1A2kIlEYGqONQrslwdeXkV1qS42xhy2xkU/xjmSoCiitKk0Bzw2u4inEChwdjQoA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine 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=b+ZK3CMx; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=r/vquj2m; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine 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="b+ZK3CMx"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="r/vquj2m" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1774899820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aC/cFt2iQduSHQ8V1HFfbWtU0eGISoNoWwZWIDsjMfE=; b=b+ZK3CMxp6xiP9xeDVoh6q9sj0C6E566GaV5mtIrjAMX4uHmC7hicp/QmTRIVjBa083vB5 X4j47k4Fqoz8NeZEiiTc/Jg52H/TDKMuKEEAq0yYJYccZWpCqDl6yViDy8WVdbIzx7e4DX qVWvIj13qvc0eDuaCxa+x8E2LX+a8J8= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-614-EU9O3-lwOPGGJ9SD9wf7Uw-1; Mon, 30 Mar 2026 15:43:37 -0400 X-MC-Unique: EU9O3-lwOPGGJ9SD9wf7Uw-1 X-Mimecast-MFC-AGG-ID: EU9O3-lwOPGGJ9SD9wf7Uw_1774899817 Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-8cd781c0d90so1467402585a.1 for ; Mon, 30 Mar 2026 12:43:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1774899817; x=1775504617; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=aC/cFt2iQduSHQ8V1HFfbWtU0eGISoNoWwZWIDsjMfE=; b=r/vquj2ms2dCCJpuF/eHiHdw1/AfXMiOkPC9QFjiXi3gZN9kbNoPnQiP/mavbvicgo Eb+9wID/F+oBZ6WFmYdeezI1F+SQLHt8LWwcpXneCp/NS5qavpTec0OeAEDFBIjQhcw0 ookrGjowgejMiQUJGhoOMC921odQWqR1d3G9aQsJlEw+CTHIw4B8wplXVRLRmnoy1QJA v6B480yCzHZNymaEK/sgC4eukZKj3AKnBHQ0c3iBbJwasWer3hkx/ebsgxrKF9HMEumt rJ6Fjno5IItemUz20PHMPBPbLMdFzV3/Dwk2EgQUGGHAW1EIWeX4rM4yTluKP1w9rjWV ixdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774899817; x=1775504617; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=aC/cFt2iQduSHQ8V1HFfbWtU0eGISoNoWwZWIDsjMfE=; b=g7EhXjNFxpcLJ26GFMUJ0X9nhEmRoh8aXQ27jsyW/KGbWCuCNDajLO5LLMLBmcCEhZ TpLe408trBa8h7z9L8ZPqnOhdMbRuo/z+ZTiMiOSdLa/L7ARuqX1vp8wdCIxVCNb2zPb d7jw4o0cVUStWUvLd7VbAfGzqHa4lHxo5nXq8hv+C2jgjR6f8LtwU+G9zJwoKtw7jI8o xKWWEvyzVA2oTyZ2Q1/Y0hLF4cTcUz2Os8qTbMgD/OHRrBV4plM8qlHjouqml/d2BGV+ //w7GyZZEDpHzdvDT6glxe3y+jNqrY8rRYUjOcXBi1kxjgULZUxl27ojNilPja8dBCvU vk2Q== X-Forwarded-Encrypted: i=1; AJvYcCWgtMLdtbeylMaK7d0vlml4NI2jxj1Yq54NpOtxnUIAPd6cl6y0iPyV/tOvlkmpnB8SuW0KhpkhxKOAXtw=@vger.kernel.org X-Gm-Message-State: AOJu0YzZeeEAmq4VJGAx90HklnP7SPQdEOCKiN391eO6lqZWsbvW8m7E TW9uscykvAe6687rZWmGdKLHmUVAnd5BKYQRU3jPvDa9RItDdwz6CrvBtBsjmDeTHgziMkCPxve BqQ9BimjjDuj+px1qUd45IPtoFjzHPSH3SbXwaYYyYGVlnLYqraYJjAj9RpdwEfI41w== X-Gm-Gg: ATEYQzzZRTFhKGJV+3BPJqA8j9sZDHeaB2sDgtwC9CiS5Mc+/3SKrX4IWyCw5f54+GE pcoaZDjI8QC2e7qhrm/tBXqV3C6p8zcxRjtMki6cW9ELYcj7+NQ/bhIM11NXUj6cST8NtPjcaLa Js6KvoSkuF7WNYe/fabAzAhOkOR1ZpQq/bSyyfJPCaq1cMWjcA2XbhtMknkZs4W7sKvCWs712Tp nSCsLeYxuXj0hErz7o7w+Wor4j2vg77k3CHouxcc8i2hpxsqheCBzAtL8xximoiDgywiMiqOlHY zisK4d2cN5rpfMYPvMwHosgL2nRcWwwdrC9MRlUN9sdR0cYqfn3P2vPvxBt2h8DtivLYH3piFf+ g5JC/dWzgXeKXaG8tDBB0XXo8KqJBdu0KFrmHk463lnxzMamnrV0= X-Received: by 2002:a05:620a:4807:b0:8cf:c58e:f056 with SMTP id af79cd13be357-8d1aa67bedemr115415685a.24.1774899817090; Mon, 30 Mar 2026 12:43:37 -0700 (PDT) X-Received: by 2002:a05:620a:4807:b0:8cf:c58e:f056 with SMTP id af79cd13be357-8d1aa67bedemr115412185a.24.1774899816620; Mon, 30 Mar 2026 12:43:36 -0700 (PDT) Received: from crwood-thinkpadp16vgen1.minnmso.csb ([50.145.183.242]) by smtp.gmail.com with ESMTPSA id af79cd13be357-8d027f29135sm677016785a.20.2026.03.30.12.43.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2026 12:43:36 -0700 (PDT) Message-ID: <829e7da72cf2b3b9bdc766786d1d5eea88b61f3c.camel@redhat.com> Subject: Re: [PATCH v2] tracing/osnoise: Add option to align tlat threads From: Crystal Wood To: Tomas Glozar , Steven Rostedt , Masami Hiramatsu Cc: Mathieu Desnoyers , John Kacur , Luis Goncalves , Costa Shulyupin , Wander Lairson Costa , LKML , linux-trace-kernel Date: Mon, 30 Mar 2026 14:43:35 -0500 In-Reply-To: <20260302131316.385987-1-tglozar@redhat.com> References: <20260302131316.385987-1-tglozar@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.2 (3.56.2-2.fc42) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Mon, 2026-03-02 at 14:13 +0100, Tomas Glozar wrote: > Add an option called TIMERLAT_ALIGN to osnoise/options, together with a > corresponding setting osnoise/timerlat_align_us. >=20 > This option sets the alignment of wakeup times between different > timerlat threads, similarly to cyclictest's -A/--aligned option. If > TIMERLAT_ALIGN is set, the first thread that reaches the first cycle > records its first wake-up time. Each following thread sets its first > wake-up time to a fixed offset from the recorded time, and increments > it by the same offset. >=20 > Example: >=20 > osnoise/timerlat_period is set to 1000, osnoise/timerlat_align_us is > set to 20. There are four threads, on CPUs 1 to 4. >=20 > - CPU 4 enters first cycle first. The current time is 20000us, so > the wake-up of the first cycle is set to 21000us. This time is recorded. > - CPU 2 enter first cycle next. It reads the recorded time, increments > it to 21020us, and uses this value as its own wake-up time for the first > cycle. > - CPU 3 enters first cycle next. It reads the recorded time, increments > it to 21040 us, and uses the value as its own wake-up time. > - CPU 1 proceeds analogically. >=20 > In each next cycle, the wake-up time (called "absolute period" in > timerlat code) is incremented by the (relative) period of 1000us. Thus, > the wake-ups in the following cycles (provided the times are reached and > not in the past) will be as follows: >=20 > CPU 1 CPU 2 CPU 3 CPU 4 > 21080us 21020us 21040us 21000us > 22080us 22020us 22040us 22000us > ... ... ... ... >=20 > Even if any cycle is skipped due to e.g. the first cycle calculation > happening later, the alignment stays in place. >=20 > Signed-off-by: Tomas Glozar Reviewed-by: Crystal Wood -Crystal