Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4441778pxj; Wed, 12 May 2021 05:52:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsATmAbeiWHkKJ+cEONLKDWuI5SNBj/6+PpqfSdOTFjduYdi5JliJUAz8R5yxu7kF1DrKK X-Received: by 2002:a17:906:3615:: with SMTP id q21mr4700371ejb.414.1620823977896; Wed, 12 May 2021 05:52:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620823977; cv=none; d=google.com; s=arc-20160816; b=NvD3g2YFNEQR37jr0ldyczi749cssC5ifEYCrUVufueaQXRktEcUUtVhSphqT6f/lJ r2MFzg70UE13sZ6+4hENwOXq2zcRJqlSDUxitiIXXQebZkk+iUeoB2/lZA07P3+osA0p 4yOBcQYtFzSxWN1z4+xZ6ECr2qVQbZtJcWJz+fQPnDnztOHad/o/aVvzphlTcjqyVKZB MADFx8x77w38u5F89ReC0Ll9oiC8uex1RoBO3ZlbJWseQr57HN2Q/2TB9tgdG1E9dzGy hObX0jQCPFUsVVROJd+xHLilfnoLkjOb52D+InnSB5QyMu+Jpn7sG5KY9eOoU62AYNwl lN4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=EHo8Um/Yao4wgjlCL2kpN65vP23zytGFwA2JQrNZcRw=; b=S/V1gL1udn6EdvoFGD4kYhOMT+oCsWZr0K8YSwn/UqaSzcSGbvBSPylM2v89gOFwSZ HXA85eXBoRJW4ba7S8mBlUWqBv29il2dFELABNWP6YAqND/bA/izsRSvprMozkSQIJ0C TzJM3QTgEEbXGBTHh6iKJEvyjdjgdUWwQOlTdIEgGuJyPo453PVbZCl2s4jrqGwldKiP Yt81hOD87pPsgdivxFkUhrwhDcw2L4yX2AoitWqibQGdH0nQyRNFdR7AytA6aQAYmzX9 0KoykKOKQ7ZfWpjLSHkNNF0fSA6ZxM7h7yKSJ/mQeMy9v+p7BKlL62f4oQhAlzanUJxG /3/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=mnHo6V0U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i17si4801311ejj.204.2021.05.12.05.52.29; Wed, 12 May 2021 05:52:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=mnHo6V0U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232812AbhELMiv (ORCPT + 99 others); Wed, 12 May 2021 08:38:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232808AbhELMiu (ORCPT ); Wed, 12 May 2021 08:38:50 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D017C061574 for ; Wed, 12 May 2021 05:37:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=EHo8Um/Yao4wgjlCL2kpN65vP23zytGFwA2JQrNZcRw=; b=mnHo6V0UlJh79ufuLEj3A/j2Fc ngaNrBAcwrSIJ1C+H1IqzDVVPTwopLMYtufPumnnf3kREjR5KwLUF1YWE8XZSk6tPsueLfxDdxqCL 5ZZCnJIKLtzGYmqTn2MwwULWzikQlejNdf9YxBr+ikouYyeJFqAsiGlMupDq8s9+GZoSC/3mWxTfa H7r25X92pRL50BraZGBnq0sa/C3qIt6sI9mvApBKLHVuK56geSqqf9KEXO1uXBlwRqZuLJOvkQUo0 oL4Yk1lp3cvM9IK7GAcuNtxpQcF2ZZsovgT3+c6111w1ABzoobpNIyniEQK6rpH/jLs8xfywQfJAJ vnzr9qrw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lgo74-002l9n-5V; Wed, 12 May 2021 12:37:18 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (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) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 3C94230026A; Wed, 12 May 2021 14:37:12 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 1DEEF2040BF87; Wed, 12 May 2021 14:37:12 +0200 (CEST) Date: Wed, 12 May 2021 14:37:12 +0200 From: Peter Zijlstra To: Leo Yan Cc: Ingo Molnar , Will Deacon , Waiman Long , Boqun Feng , Thomas Gleixner , "Rafael J. Wysocki" , "Steven Rostedt (VMware)" , linux-kernel@vger.kernel.org Subject: Re: [PATCH] locking/lockdep: Correct calling tracepoints Message-ID: References: <20210512120937.90211-1-leo.yan@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210512120937.90211-1-leo.yan@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 12, 2021 at 08:09:37PM +0800, Leo Yan wrote: > The commit eb1f00237aca ("lockdep,trace: Expose tracepoints") reverses > tracepoints for lock_contended() and lock_acquired(), thus the ftrace > log shows the wrong locking sequence that "acquired" event is prior to > "contended" event: > > -0 [001] d.s3 20803.501685: lock_acquire: 0000000008b91ab4 &sg_policy->update_lock > -0 [001] d.s3 20803.501686: lock_acquired: 0000000008b91ab4 &sg_policy->update_lock > -0 [001] d.s3 20803.501689: lock_contended: 0000000008b91ab4 &sg_policy->update_lock > -0 [001] d.s3 20803.501690: lock_release: 0000000008b91ab4 &sg_policy->update_lock > > This patch fixes calling tracepoints for lock_contended() and > lock_acquired(). > > Fixes: eb1f00237aca ("lockdep,trace: Expose tracepoints") > Signed-off-by: Leo Yan No idea how that happened, curious. Thanks for fixing though!