Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp1202790rwo; Wed, 2 Aug 2023 10:08:56 -0700 (PDT) X-Google-Smtp-Source: APBJJlEgI7TQhIsiHAQIhsavz9P9uKQk5uMeJZ4M6FuwLF74ERv6Z3zDy6eQ7YUyhXCzEFzZnAFU X-Received: by 2002:a05:6a21:790a:b0:134:2e3c:9845 with SMTP id bg10-20020a056a21790a00b001342e3c9845mr15742741pzc.22.1690996135934; Wed, 02 Aug 2023 10:08:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690996135; cv=none; d=google.com; s=arc-20160816; b=rQ3HuFLrTukeG5yUmwBrOvVMSgMrpBwIw0p5IJiIgNVU+Wpjc91uCzrZlNID9SHh7k qliRMmWOrxBbwIW3Cs5fc+1I1mLE13MaWgew2jyN4f0qSORIifsqrcwwGec7Q1TuFqT6 1G9Eh5mTTVKQsvFoWUPiT5VdyVBglLuQy8vabdyvn6uWCeN1bP9V+E1tGmFVGmesh9BO hGHEVz2z36hL69NTrMwceWjWe1K1vYOzkHp93UCPy+48gPrurfTJ12Xx++0D0z5+5UJe /kUx20fKauyaJv9HbpizL2BKxWqqVEHrAHjesumTiR8Q+1RwnWjHPqUGy/e/cPs7z6Fh lt7g== 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-transfer-encoding :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=7pRjl+B1q3UHxxQ2GRwU5PMY8WYGnRgHOHRmJNJuXaE=; fh=LlNfeoFkgUtMBLhjTZRcaa2CiVuNa0wtZte5HJ7wKPk=; b=Adfc+Q5Z1CXBwJ3y+Sra8vpGLS/HkC+CUcINGWE663WDe6D6wYpo0i4iCy53VEm+Y0 Ep+rInZ6lpczWzI9Jilx2Tf9V0vo9zu/mi2sFiTzP+0YR0UlrN45AbMTqs9aMzqQnQsk 99sQUBbnPleQpemJubQxW29rBJxYDA4Ob20C3+rMMGqJixU1Xdoz4YNVl6UFbj/hEOnu oMMKYVskgHct0cGWik3n7b9ZGZe6eZkm2k65nnznMhgjLgTEbcYRiJWRaw1zK+NbMeqI lV/F0+sppaZzrVX38a2qreP4oSYlgKXcCrSO2OZ23g8/WgFMUTaHF+eZfpUDh2nvplM3 I2cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="kuI0yh/a"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b26-20020a6567da000000b0055b79986063si10078226pgs.300.2023.08.02.10.08.41; Wed, 02 Aug 2023 10:08:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="kuI0yh/a"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S232273AbjHBQwZ (ORCPT + 99 others); Wed, 2 Aug 2023 12:52:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232148AbjHBQwF (ORCPT ); Wed, 2 Aug 2023 12:52:05 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 699A03C0D; Wed, 2 Aug 2023 09:51:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EFDA261909; Wed, 2 Aug 2023 16:51:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 513E4C433C7; Wed, 2 Aug 2023 16:51:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690995073; bh=hCZIrShg5wx7M4GzDWHg4uvKcAvNwnhm59vC8hv5k5A=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=kuI0yh/aIIZuS6R1HnnEW2X2qTWNcthk43+okckWEgMBVPfoO84LDet0eTKXGAiwt RPgx6qFz7N+hLt0owNYg1/4ChmfwG2FDfjRzvJIl0rGHu3F+EPPykIEPYA9eOvL3uI Kuby6obh3jl+D5GmPGWSpPSa8Yk1vtYAdWo+8xeYCObKbsA8SH/Dy8FqpZa9SakxeM mdaDTmrYf4Fb9d1shP+PowZ37pXqDe8Xq6d8GZs3FMiWgcQNlQY25USR5UWAhH0Ew1 dzf+qLnV+I4SaAEPXhkrY7209t/YAUucNL8jyBTW2swAhoPksVdKvlZwMlcla/g5QE juNxGjBmCzh0Q== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id E503DCE0594; Wed, 2 Aug 2023 09:51:12 -0700 (PDT) Date: Wed, 2 Aug 2023 09:51:12 -0700 From: "Paul E. McKenney" To: Roy Hopkins Cc: Guenter Roeck , Peter Zijlstra , Joel Fernandes , Pavel Machek , Greg Kroah-Hartman , stable@vger.kernel.org, patches@lists.linux.dev, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, akpm@linux-foundation.org, shuah@kernel.org, patches@kernelci.org, lkft-triage@lists.linaro.org, jonathanh@nvidia.com, f.fainelli@gmail.com, sudipm.mukherjee@gmail.com, srw@sladewatkins.net, rwarsow@gmx.de, conor@kernel.org, rcu@vger.kernel.org, Ingo Molnar Subject: Re: scheduler problems in -next (was: Re: [PATCH 6.4 000/227] 6.4.7-rc1 review) Message-ID: Reply-To: paulmck@kernel.org References: <20230731145232.GM29590@hirez.programming.kicks-ass.net> <7ff2a2393d78275b14ff867f3af902b5d4b93ea2.camel@suse.de> <20230731161452.GA40850@hirez.programming.kicks-ass.net> <20230731211517.GA51835@hirez.programming.kicks-ass.net> <8215f037-63e9-4e92-8403-c5431ada9cc9@paulmck-laptop> <4f18d78411a5477690640a168e0e5d9f28d1c015.camel@suse.de> <063a2eba-6b5e-40bc-afd4-7d26f12762e4@paulmck-laptop> <10f9d5152389e3e76f200f737f11ec721a8e148f.camel@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <10f9d5152389e3e76f200f737f11ec721a8e148f.camel@suse.de> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 02, 2023 at 04:31:12PM +0100, Roy Hopkins wrote: > On Wed, 2023-08-02 at 08:05 -0700, Paul E. McKenney wrote: > > On Wed, Aug 02, 2023 at 02:57:56PM +0100, Roy Hopkins wrote: > > > On Tue, 2023-08-01 at 12:11 -0700, Paul E. McKenney wrote: > > > > On Tue, Aug 01, 2023 at 10:32:45AM -0700, Guenter Roeck wrote: > > > > > > > > > > > > Please see below for my preferred fix.? Does this work for you guys? > > > > > > > > Back to figuring out why recent kernels occasionally to blow up all > > > > rcutorture guest OSes... > > > > > > > > ????????????????????????????????????????????????????????Thanx, Paul > > > > > > > > ------------------------------------------------------------------------ > > > > > > > > diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h > > > > index 7294be62727b..2d5b8385c357 100644 > > > > --- a/kernel/rcu/tasks.h > > > > +++ b/kernel/rcu/tasks.h > > > > @@ -570,10 +570,12 @@ static void rcu_tasks_one_gp(struct rcu_tasks *rtp, > > > > bool midboot) > > > > ????????if (unlikely(midboot)) { > > > > ????????????????needgpcb = 0x2; > > > > ????????} else { > > > > +???????????????mutex_unlock(&rtp->tasks_gp_mutex); > > > > ????????????????set_tasks_gp_state(rtp, RTGS_WAIT_CBS); > > > > ????????????????rcuwait_wait_event(&rtp->cbs_wait, > > > > ?????????????????????????????????? (needgpcb = rcu_tasks_need_gpcb(rtp)), > > > > ?????????????????????????????????? TASK_IDLE); > > > > +???????????????mutex_lock(&rtp->tasks_gp_mutex); > > > > ????????} > > > > ? > > > > ????????if (needgpcb & 0x2) { > > > > > > Your preferred fix looks good to me. > > > > > > With the original code I can quite easily reproduce the problem on my? > > > system every 10 reboots or so. With your fix in place the problem no > > > longer occurs. > > > > Very good, thank you!? May I add your Tested-by? > > > > ????????????????????????????????????????????????????????Thanx, Paul > Yes, please do. Thank you again, and I will apply this on my next rebase. Thanx, Paul