Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3989667ybb; Mon, 23 Mar 2020 11:25:06 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvNCyMbIjqHLpS0ZclM+eeuQUtujQ/ZQDqlpIqOmi8m22n7DpURQDvi3rqfxi2iH+yAokJg X-Received: by 2002:aca:1913:: with SMTP id l19mr551290oii.12.1584987906341; Mon, 23 Mar 2020 11:25:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584987906; cv=none; d=google.com; s=arc-20160816; b=0Mne+HblgSy2eqxSo2bTaCjE3oklLAWGOhBeFVKPdz2QXC62+f6VreabR9Bh8ntPmO i0eFw9A94p2RT9XjW1APU55XwmXy5e3Hc5fczUFZ1qs6kN3/T/tudAdHwIwMfTmsFVd8 afRbiG9eO24bKgwQXTrPW8OI3u3vwyrjDjAGSkCQ61Re3hj/iBwk0TGMwLx9dJYdmm1T ibhQ2FzRHAM7rQSARq9hLhLE53DyCK+24Mid1YOSPppxLHAc0/cd0zOqy/sepFHxOLRy hPl3vGS9xH7pQkriPk9PqrbDi+NdP63e779MBsnlr5OTu5p6beXCd1I19KB/7jed6HoK aEWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=7xMPR8XGvEMsCg+WPqGvf1eSLi5UV6ZkvZ0G+ax8+rI=; b=oxdl7Rw1hO7b3tHNz6xVhrn2VvbXa646zjWKpf4j6kQ0oyydtJUPTDLNK+jg10S1XK ap8zNQHI+p+a/2XRUI6UiM6S2XSFEEdHl+VtdSBEdQk7pIhzXSFLSkrQeUD1l4AUM8WK VFLEXyH1OmmtnU71QBfphGDTUZU609ZygNd2YeO4pKYJiPrYHjsJAok1SS4j7wc70hg6 LbMxPJlPr/2fgNUFd4qL9DqWnTkc8KbTsOKQIE695vB8jcVXuIEj5nkUyu986NXhy1jp aprxpz51QlPH+9nfx8RP4mnhmC1O5GrQX9LSH5kStZWRpjqy7AFFW+lsCmygJUw/ODzJ nD/w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e20si7878426otk.273.2020.03.23.11.24.51; Mon, 23 Mar 2020 11:25:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727725AbgCWSX5 (ORCPT + 99 others); Mon, 23 Mar 2020 14:23:57 -0400 Received: from foss.arm.com ([217.140.110.172]:53024 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727576AbgCWSXz (ORCPT ); Mon, 23 Mar 2020 14:23:55 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D11811FB; Mon, 23 Mar 2020 11:23:54 -0700 (PDT) Received: from e107158-lin.cambridge.arm.com (e107158-lin.cambridge.arm.com [10.1.195.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2D4A83F52E; Mon, 23 Mar 2020 11:23:54 -0700 (PDT) Date: Mon, 23 Mar 2020 18:23:51 +0000 From: Qais Yousef To: "Paul E. McKenney" Cc: Davidlohr Bueso , Josh Triplett , linux-kernel@vger.kernel.org Subject: Re: Hit WARN_ON() in rcutorture.c:1055 Message-ID: <20200323182351.xr764b6wafzs6fse@e107158-lin.cambridge.arm.com> References: <20200323154309.nah44so2556ee56g@e107158-lin.cambridge.arm.com> <20200323155731.GK3199@paulmck-ThinkPad-P72> <20200323170609.w64xrfahd2snfz6h@e107158-lin.cambridge.arm.com> <20200323171751.GL3199@paulmck-ThinkPad-P72> <20200323174147.lneh4rp4tazhtm6x@e107158-lin.cambridge.arm.com> <20200323181010.GN3199@paulmck-ThinkPad-P72> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200323181010.GN3199@paulmck-ThinkPad-P72> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/23/20 11:10, Paul E. McKenney wrote: > On Mon, Mar 23, 2020 at 05:41:48PM +0000, Qais Yousef wrote: > > On 03/23/20 10:17, Paul E. McKenney wrote: > > > On Mon, Mar 23, 2020 at 05:06:10PM +0000, Qais Yousef wrote: > > > > On 03/23/20 08:57, Paul E. McKenney wrote: > > > > > On Mon, Mar 23, 2020 at 03:43:09PM +0000, Qais Yousef wrote: > > > > > > Hi > > > > > > > > > > > > I hit the following warning while running rcutorture tests. It only happens > > > > > > when I try to hibernate the system (arm64 Juno-r2). > > > > > > > > > > Hibernating the system during rcutorture tests. Now that is gutsy! ;-) > > > > > > > > Hehe was just a side effect of testing the cpu hotplug stuff :-) > > > > > > > > > > > > > > > Let me know if you need additional info. > > > > > > > > > > 1. Do you need this to work? If so, please tell me your use case. > > > > > > > > Nope. It just happened while trying to stress the cpu hotplug series I just > > > > posted. > > > > > > > > > 2. What is line 1055 of your rcutorture.c? Here is my guess: > > > > > > > > It's 5.6-rc6, sorry should have mentioned in the report. > > > > > > > > /* Cycle through nesting levels of rcu_expedite_gp() calls. */ > > > > if (can_expedite && > > > > !(torture_random(&rand) & 0xff & (!!expediting - 1))) { > > > > WARN_ON_ONCE(expediting == 0 && rcu_gp_is_expedited()); > > > > if (expediting >= 0) > > > > rcu_expedite_gp(); > > > > else > > > > rcu_unexpedite_gp(); > > > > if (++expediting > 3) > > > > expediting = -expediting; > > > > } else if (!can_expedite) { /* Disabled during boot, recheck. */ > > > > > > > > If it's something you don't care about, then I don't care about too. I just > > > > thought I'd report it in case it uncovered something worthwhile. > > > > > > Well, my guess was wrong. ;-) > > > > > > This is instead rcutorture being surprised by the fact that RCU grace > > > periods are expedited during the hibernate process. I could fix this > > > particular situation, but I bet that there are a number of others, > > > including my guess above. > > > > > > One approach would be to halt rcutorture testing just before hibernating > > > and restart it just after resuming. > > > > > > Thoughts? > > > > {register, unregister}_pm_notifier() don't seem to be too hard to use. > > That part is easy. It would also be necessary to find all the affected > warnings in rcutorture and suppress them, not only during this time, > but also for some period of time afterwards. Maybe this is the only one, > but that would be surprising. ;-) Wouldn't be easier to just deinit/init()? ie: treat it like unload/load module. But you'll lose some info then that maybe you'd like to keep across suspend/resume cycles. > > > But if it's not that simple, then it's not worthwhile I'd say. The report > > lives in LKML as a documentation of this missing support :-P > > It might at some point be necessary for rcutorture to handle suspends > and hibernates in midstream, and yes, it could be done, but first I need > to see some reason why it provides significant help. Sounds reasonable to me. I agree my use case isn't sensible in general. It just happened because I was testing an operation that affected both hibernation and rcutorture test and I tend to compile my kernels with everything built-in. Thanks -- Qais Yousef