Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1503084pxb; Fri, 6 Nov 2020 11:17:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJz3zxaGmL9ZOpH8CydKLPAkGRQrvZRd1NCThXSBVALCIbv3O6KRBviD/wZEZYSnHFnhjqOe X-Received: by 2002:aa7:c9c3:: with SMTP id i3mr3680904edt.236.1604690227493; Fri, 06 Nov 2020 11:17:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604690227; cv=none; d=google.com; s=arc-20160816; b=m+g6zCnWsxFR+JyitJv19GPSgHWyLw/DghHu/OBtJVs9GiSL1Yx1Nge6crOyqPsooX VfrWJPwA2ur59Yf3uBYE7LHkf4+8u9SrjiBDZSLhiMtFcQ6fwEKYxPugOmzH4r000oB2 0xMApixRVGay43PcBL3tLQpr0vtJ8QFR3KZXqaRwIV7f8rQPqkgmxG4Gv6EmVzXY1b+8 KUh1NZ2kMgTjcNFTlO0asQpxpBihZy8jOUUS0XpT1OPXADFGtZwezltycdNMRbwLc5eL 7GxjWZsFuid724KrPxx8kgdncKljNlCIfpwl2JS70yYn/u8pFYYPTjfwe3sCFawX9CVc F+xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=W2swnvTMxo2poImzmVkN79ok7n/BlY8Qq9hben7yJ18=; b=KzcfAujkBiQYJlbI2FUeJ2GlriYHTXegSeeK4S0cwxecAGef9UoRV4HsAUSuDdxBag L+P3zq+XvSUnsCyDrz/+RjnWBf5yKMLpB5IKsKigvwgwQggCbfxFiW5C5l/VaN3AH/mv Vcy1m2Vqmu/0I0z1TvUr4PvsRIpo/1A7wiGqO4ZMiTYERr0rvOnRQLUH7mPizVK9v2c6 DWTt0dUdJV4M9j7dsGsguoPMWY/md89CACKP5mWmVw3lmCaMV7qSZkiAJBcA2+rtViOU xdfXEFhNR57tha0p+Y0REqxyv/UpHCKOVorUGM0RV1tdqjZG4gaKXfzdTIZ1/bYuCEJ5 umiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HsNRShLL; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t17si1635529edq.418.2020.11.06.11.16.43; Fri, 06 Nov 2020 11:17:07 -0800 (PST) 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=@kernel.org header.s=default header.b=HsNRShLL; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728001AbgKFTNM (ORCPT + 99 others); Fri, 6 Nov 2020 14:13:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:57916 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728122AbgKFTNM (ORCPT ); Fri, 6 Nov 2020 14:13:12 -0500 Received: from paulmck-ThinkPad-P72.home (50-39-104-11.bvtn.or.frontiernet.net [50.39.104.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4376120882; Fri, 6 Nov 2020 19:13:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604689991; bh=GlE34wY4SMh9cHwy9fY5b6a+GW8qy3H3b92CYNVkOlY=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=HsNRShLLsMj3MumqMT21spb7ze6Rkyd1cY9WfrQYFRmWpVJXVU4LVOyO5p2MliUSg AhjY++FpjhcWNOaAefQhI3o271/+oUMsG5+HP8sWZ/61GuZh4iYYinCA/lt9i7sTmA dOV9YcIfvvzVcYRkbEglEJQvAt9GjExC6MFHdHaU= Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id EDBCC352097B; Fri, 6 Nov 2020 11:13:10 -0800 (PST) Date: Fri, 6 Nov 2020 11:13:10 -0800 From: "Paul E. McKenney" To: Davidlohr Bueso Cc: rcu@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com, mingo@kernel.org, jiangshanlai@gmail.com, akpm@linux-foundation.org, mathieu.desnoyers@efficios.com, josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com, fweisbec@gmail.com, oleg@redhat.com, joel@joelfernandes.org Subject: Re: [PATCH tip/core/rcu 03/28] locktorture: Track time of last ->writeunlock() Message-ID: <20201106191310.GZ3249@paulmck-ThinkPad-P72> Reply-To: paulmck@kernel.org References: <20201105234658.GA23142@paulmck-ThinkPad-P72> <20201105234719.23307-3-paulmck@kernel.org> <20201106065642.ti7mgrll7mbrndja@linux-p48b.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201106065642.ti7mgrll7mbrndja@linux-p48b.lan> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 05, 2020 at 10:56:42PM -0800, Davidlohr Bueso wrote: > On Thu, 05 Nov 2020, paulmck@kernel.org wrote: > > > From: "Paul E. McKenney" > > > > This commit adds a last_lock_release variable that tracks the time of > > the last ->writeunlock() call, which allows easier diagnosing of lock > > hangs when using a kernel debugger. > > This makes sense to have. > > Acked-by: Davidlohr Bueso Will apply, thank you! Thanx, Paul > > Cc: Davidlohr Bueso > > Signed-off-by: Paul E. McKenney > > --- > > kernel/locking/locktorture.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/kernel/locking/locktorture.c b/kernel/locking/locktorture.c > > index 62d215b..316531d 100644 > > --- a/kernel/locking/locktorture.c > > +++ b/kernel/locking/locktorture.c > > @@ -60,6 +60,7 @@ static struct task_struct **reader_tasks; > > > > static bool lock_is_write_held; > > static bool lock_is_read_held; > > +static unsigned long last_lock_release; > > > > struct lock_stress_stats { > > long n_lock_fail; > > @@ -632,6 +633,7 @@ static int lock_torture_writer(void *arg) > > lwsp->n_lock_acquired++; > > cxt.cur_ops->write_delay(&rand); > > lock_is_write_held = false; > > + WRITE_ONCE(last_lock_release, jiffies); > > cxt.cur_ops->writeunlock(); > > > > stutter_wait("lock_torture_writer"); > > -- > > 2.9.5 > >