Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4512214pxj; Wed, 12 May 2021 07:14:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDbN5oQx2ikPlXU1ixAtftpUM109qwowyDHCBvGBtQQCqLImFqr8VfmXCX7byOE4FhTkeI X-Received: by 2002:a05:651c:293:: with SMTP id b19mr28907176ljo.451.1620828852013; Wed, 12 May 2021 07:14:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620828852; cv=none; d=google.com; s=arc-20160816; b=HBcDea3UJK41pxehrBHyEopwAJHWrhO0envh+uboLkbJo7NVvI6HcwCnviX8Ns7o0g JdE06sOschtitN1ef4IajTk/PGeayYmY8MAY8KCpmg005JCusMaSGBktn0WhZvhBE7GS uxT6Iq01DGk6RPoqds74h0Ai1ViZh/LWcQn4w87oku6xJRjlZcmOdd3cOEJiGzPPQo7L UnQczFsMr1t/DShm3byjADYUfcyo8O8EzAnuHTTUxiaBDMaaKKExNSvjgKfPo5YxE9jZ BF+ZD35tw2W7VJdKGb3VMeFCVZqQe2jek+IZ3Fx4kH/NEDMdDM6UT04y2oPHoHpgjRXS FQfg== 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=Y7UUqSC5YygtyOLuSAqM+kSVGDcF3hhEDi3+UNe+ksA=; b=D/BkJXWiAblo1RLDK/adbvxR/Fa5IRhYlz2PCLPWdaaoNDPcEG//9igL8PJQwHBwbm Oo3dEqOhfFEHWalaTM1QRDd3+dSxY3twBhuLUYiNGxPSLxIyzSp1Q0B9mqlHiW637gqo PzYHosbuTYERmqtE17RTrhrkqDEiXnNFioPHDgus+3b15JmNImm1X9O7jmZWiElEcIxO SOjZv8UHk631T/M21S78DRG8+R2XFtHUxAi0EzJLWiHmdtmU5NK++PnL2gPKPH11MPBw oQuszIBo4TgbS+KfU3W7McJdKHr76b8Y3tYkbpX/ayd94HosCC1ny7pxfg/9KD23Vsdr upCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=m1MBdkmv; 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 u12si22434lfi.306.2021.05.12.07.13.41; Wed, 12 May 2021 07:14:11 -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=casper.20170209 header.b=m1MBdkmv; 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 S230301AbhELOKN (ORCPT + 99 others); Wed, 12 May 2021 10:10:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230018AbhELOKM (ORCPT ); Wed, 12 May 2021 10:10:12 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6EFB4C061574 for ; Wed, 12 May 2021 07:09:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=Y7UUqSC5YygtyOLuSAqM+kSVGDcF3hhEDi3+UNe+ksA=; b=m1MBdkmviLmNBBMYlpisRg5CaE SRoCx43tcrLcsKRhhBum43akFcTVRwGH1u2On+XznUWB5PWo0bsz/QMkTPOZ5x/N+Tnz1Jn6o9i8w axI8FWyWxHwNvcVLYvX4yJyZ6cQMYdTRhYw31RriKd6JXWVy6dFu30uPxm2JQyvupYxKUSw3gScrz A9BPt2T0cMEFeokK22PtVdgl/Y3Pgz3JBJB7k+XuMfLHV7w19kWqZN66pYOJkiX7q3+FCaLZ9s7VR csC5NPDwVUzk6LVEXiHqfuqWX9VJrYuPHWtgDhmQSnEGpYnUZ1wkH3trXf7jzQqlsdsh2dYFzORRk 8Ck8WhPw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lgpUV-008Kyv-1E; Wed, 12 May 2021 14:06:02 +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 1BA5B3002C1; Wed, 12 May 2021 16:05:34 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 00DF328B2AEC4; Wed, 12 May 2021 16:05:33 +0200 (CEST) Date: Wed, 12 May 2021 16:05:33 +0200 From: Peter Zijlstra To: Steven Rostedt Cc: Leo Yan , Ingo Molnar , Will Deacon , Waiman Long , Boqun Feng , Thomas Gleixner , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org Subject: Re: [PATCH] locking/lockdep: Correct calling tracepoints Message-ID: References: <20210512120937.90211-1-leo.yan@linaro.org> <20210512093202.5fca1259@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210512093202.5fca1259@gandalf.local.home> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 12, 2021 at 09:32:02AM -0400, Steven Rostedt wrote: > On Wed, 12 May 2021 14:37:12 +0200 > Peter Zijlstra wrote: > > > 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! > > Signed-off-by: Peter Zijlstra (Intel) > Reviewed-by: Steven Rostedt (VMware) > Reviewed-by: Thomas Gleixner > Acked-by: Rafael J. Wysocki > Tested-by: Marco Elver > > That's embarrassing :-p Thing is, if you look at the list copy: https://lore.kernel.org/lkml/20200821085348.782688941@infradead.org/ things were okay. I suspect there was a conflict at some point and resolution got it backwards because the hunks are so similar and I never noticed :/