Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp502782lqg; Fri, 1 Mar 2024 11:31:23 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXIP3iZ6zKr+dfNDnMFuIrLcQySZVKs6hGNTDRjWz/SC6e6YU0qjrDFjWK/yDU3Gs+qFJTfzSX2+vwRXcOl/PUAe5J5GSyJLdGHb4m4Mg== X-Google-Smtp-Source: AGHT+IGgtgVn1jxLA1Fq93niOQGbPyV4F+fhxYpMWeS9ypQnVKE9MxhFeIjOsMxRFCtnKUcngKbj X-Received: by 2002:a05:620a:4245:b0:785:cdad:f113 with SMTP id w5-20020a05620a424500b00785cdadf113mr9078280qko.38.1709321483438; Fri, 01 Mar 2024 11:31:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709321483; cv=pass; d=google.com; s=arc-20160816; b=e8k6P3ceEIRRxTZXp5q4P6nFvNE0uNV+AxB3jriM85yMrQCETkMlhKwy6obbOeEc80 +c6DHtJpD85GIaEE4EywH0SwU5yPkrPz9zU53kcUFwbxHrsV0+5Jjt4pB3x/nmsX7QD3 Lbrdcmce0s0nIjNfvT0AfX+wL2mQ6m6yj5oQa7/BNMmaQzNwCli6W+sog3U/E5V7NAvT KEZG/+DJi9PJxn/McGowtnj+QRU17nX3zSjB5f0hymudWkWmaPP66rB+kHG+ejv5dmmR 8xPPhTcE77D6ehnbqWmdkaSq1d0TDwkCVkTByQUmWVFxWFpTxNNsZugoms3ewO3qfRZR GrwQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Hd8/kwpeFCVeTYfjQffy1z9UllQIAmCjvXWGm2lGtLc=; fh=ycZOK4i9TLeGSllQDy5C5sHacriATPLuM6NTXKA8O4Q=; b=A8J1l4F1xohXutiFNaqJIURkO0iWee+wuIrdIG/ykiUwVzWuOR0duMKd80txI350aq wKr/oEsqeb3C10dRE07oE0Rn7mHeKeLGvUubGY4slUeQS/k2+fSf90DkCWfMKBzxYae4 GSv5Wujo82dEAuBKhBPNvC5AtDvYiQQNOAAXJW41VF8RtlGaPISTGO5LV9o5P1R6l6Az wYck1hnOFA2dYC16120R6YFde27cXWrJK2FfgwvkhXADkrDomIil7GK3zGtoGRpi08Kp m2kLqtP4/qRf3WkMf5gJhkH/whJ+VybchvoqTO3TJeej5PhCN9UpHlwUEsm9vRxlAMWu 2XZA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WB+yftRD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-89024-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89024-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id b15-20020a05620a126f00b00785d6b130dbsi4091172qkl.318.2024.03.01.11.31.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 11:31:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-89024-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WB+yftRD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-89024-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89024-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 194BF1C209CA for ; Fri, 1 Mar 2024 19:31:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D6D543CF4B; Fri, 1 Mar 2024 19:30:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WB+yftRD" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 F20C83C699; Fri, 1 Mar 2024 19:30:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709321424; cv=none; b=Y64LIRerJofzw4jHebVz7QXkShGHjBVigTN/s/4dBQ5j20N6mYVunSZLsosPLMs6qp6bOHcRJeYKxjIcJIEC78U89d9BhKbRXMRHC05JQmKkDc71GUztelV4gYfxONTnlGNYh4ySQEMEagubAaxpJsIMgGmo5XwCCTZSgGyXsU8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709321424; c=relaxed/simple; bh=nDzXcSLGBW1qmjkBvu5szXANnZ49BI0gVSIKl7PQxWM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=nsVH4FSm0laUpGkIByStWMLBnyL7nxf2gurMKtKsjvvHJ86B4IofLV2phAoQt9zlNiFrb2Y+Zd9CXaj4b6hnPGAuqXmCJKreCa3YkJoJ8y7JhLDpPWPS6zjvUBiDQ51MUzLpgFDSZo34AT9Gj24lR7bwTFHpLJm/GTMaD9O1rns= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WB+yftRD; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 166F5C433F1; Fri, 1 Mar 2024 19:30:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709321423; bh=nDzXcSLGBW1qmjkBvu5szXANnZ49BI0gVSIKl7PQxWM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WB+yftRDMXoV2Al5kHkT0CPaxuwR9ur+sq8PD6c6+GVselijgUAcUrxwTFIHndXnE S99Wng1YV4UGymSW0hdp8oUmCqPzbVM+rhbwxbTFiKVixHsERpPgdENyhknj6MFLUN pEqLHhgcLHJp/Y3OgkJkNLdKLA6Ld6aA87weFwquGO0O0fiftDzJr/P538K5GeLNYD tD19QIcLeSGjsWM+kHyrzrRAUVjSVGdm6sgOh/mwnkKiocgre526GFt5AsjqBUf2NK 9LdURW3t/JX8ybx18vCNurvU228joARozDSOnxofsM65D34uJRs68BsAf4nPCmHz1r sgqmSF8LRnbbg== From: Namhyung Kim To: Ian Rogers , Namhyung Kim , Arnaldo Carvalho de Melo Cc: Peter Zijlstra , bpf@vger.kernel.org, Song Liu , Ingo Molnar , LKML , Adrian Hunter , Jiri Olsa , linux-perf-users@vger.kernel.org Subject: Re: [PATCH v2] perf lock contention: Account contending locks too Date: Fri, 1 Mar 2024 11:30:21 -0800 Message-ID: <170932136988.3731358.12075871779065575043.b4-ty@kernel.org> X-Mailer: git-send-email 2.44.0.rc1.240.g4c46232300-goog In-Reply-To: <20240228053335.312776-1-namhyung@kernel.org> References: <20240228053335.312776-1-namhyung@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit On Tue, 27 Feb 2024 21:33:35 -0800, Namhyung Kim wrote: > Currently it accounts the contention using delta between timestamps in > lock:contention_begin and lock:contention_end tracepoints. But it means > the lock should see the both events during the monitoring period. > > Actually there are 4 cases that happen with the monitoring: > > monitoring period > / \ > | | > 1: B------+-----------------------+--------E > 2: B----+-------------E | > 3: | B-----------+----E > 4: | B-------------E | > | | > t0 t1 > > [...] Applied to perf-tools-next, thanks! Best regards, -- Namhyung Kim