Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp2751280rdb; Tue, 12 Sep 2023 10:55:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG47GLMM2DutFrqC0UeZTesMhM4u5GuaFFAlxl8o11FlCIydXOYkI694g7R0t7TS9LX6ZyE X-Received: by 2002:a05:6a00:22d4:b0:68e:2fa9:e6f0 with SMTP id f20-20020a056a0022d400b0068e2fa9e6f0mr622212pfj.15.1694541304907; Tue, 12 Sep 2023 10:55:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694541304; cv=none; d=google.com; s=arc-20160816; b=JAptt4WkAQh6NXllFLCTTDErkOg504Dl3hmDmC63FX9nm3EK56+V9X55cGb6AGu5xW u4gQaHLevRDOj/Dg4Q1V54TA4RXsKpu96N2whitZWumDDucyJRRKUYEAJHUsruff4c4q 9Hln39rZxX4vZFh4eAb7bfG7rfYkRxve4gzqFFot+vYDkwCLADDIbxQ74ArF1vrR90Xr lqomJoiVjoP81aXr9mY6+zxGOyV4DwJWOoBIIjfCPZYsTMp78AlRUIXEulyT07J/h67z 7HlG5O+Fdm/g3uSCEmBFTRcnaasswNkbjLNSqRHV89uuf8/lNzIwoNOHjEKpGyfXJe4f TB1w== 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:to:from:date:dkim-signature; bh=1H8ls+IQkRjOoHBohtS89ylg9Re+cJdFS9AQQT8Ndhg=; fh=2mLXdwJZdso5ne6OvaEBDWZ1x+kWRSBTruFcCN6u2AY=; b=b3lzIctmhpFJTE7317Kk4hv+KUGgykZ00CWyas/m4cyPP7nUkHKmowCInf5wYY3QqJ T0/Seh6GWt+XDYlRGjEe+8lUM6UHA8XbFydJTwFBybDb1IAd4Km2DFi0WPS9mLEq3wVQ Frjn/ROagXgiA6qlRSiK4P5Z+LGkzXruHWNrSNoHz/RSVf7qyEIh/1U6E7k9+WqMgwVj KiQ0iqFBK0kXnoEHc9hZ9oY7bY+mHM1c2hCeJuXsoWe/ORl3HSkKHa2K9rPpmI67Lm6W KX5mhl3hqoQlJ8gx4IuaTLh4d03RIF9kA+9K0Nv7Gskk1QJv0tpytW93tus0R1Wv/g77 6nuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="q0IYV6V/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id cj6-20020a056a00298600b0068be042fe24si8246757pfb.356.2023.09.12.10.54.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 10:55:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="q0IYV6V/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 832708082CE6; Tue, 12 Sep 2023 07:10:28 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.8 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235888AbjILOKX (ORCPT + 99 others); Tue, 12 Sep 2023 10:10:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235818AbjILOKT (ORCPT ); Tue, 12 Sep 2023 10:10:19 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1637110D; Tue, 12 Sep 2023 07:10:16 -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:To:From:Date:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description; bh=1H8ls+IQkRjOoHBohtS89ylg9Re+cJdFS9AQQT8Ndhg=; b=q0IYV6V/ayldHIS9jOHJgEblCA l0sDCPR7g5Kxq7OOYmWyXC9GIx8gQP9d42a/jxpZrr1T+kvOvU2XJFacUARSih9SEGoHSjJU+Pc6j KS3WngUvRlzMrudf2Aoy28JxpeIyMlnXOelIdmVEVSLuungSmw4Nrh0E/YMnf5lona7sYSxHq87yF 6xfa5G6QaSU+u7teIIdNjgu9UjHDfnApcbaS2cjToufYF4XsGyw088elsxEkm4q9Vghw4H3Ys0Hzw hNFP+xoau2giFfvRvE715f/C3qmTeWWd8gk9nRAgxM+qwWeKnyoPkal6WvEp9QGaJnfX2jGEkmk4t b0Q/U0fQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qg45e-007yYW-7T; Tue, 12 Sep 2023 14:10:06 +0000 Date: Tue, 12 Sep 2023 15:10:06 +0100 From: Matthew Wilcox To: "Liam R. Howlett" , "Paul E. McKenney" , Geert Uytterhoeven , Andrew Morton , maple-tree@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Shanker Donthineni Subject: Re: [PATCH v2 1/2] maple_tree: Disable mas_wr_append() when other readers are possible Message-ID: References: <20230819004356.1454718-1-Liam.Howlett@oracle.com> <20230819004356.1454718-2-Liam.Howlett@oracle.com> <3f86d58e-7f36-c6b4-c43a-2a7bcffd3bd@linux-m68k.org> <20230906152325.dblzauybyoq5kd35@revolver> <20230906172954.oq4vogeuco25zam7@revolver> <495849d6-1dc6-4f38-bce7-23c50df3a99f@paulmck-laptop> <20230911235452.xhtnt7ply7ayr53x@revolver> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230911235452.xhtnt7ply7ayr53x@revolver> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 12 Sep 2023 07:10:28 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email On Mon, Sep 11, 2023 at 07:54:52PM -0400, Liam R. Howlett wrote: > Taking the mutex lock in kernel/irq/manage.c __setup_irq() is calling a > cond_resched(). > > >From what Michael said [1] in this thread, since something has already > set TIF_NEED_RESCHED, it will eventually enable interrupts on us. > > I've traced this to running call_rcu() in kernel/rcu/tiny.c and > is_idle_task(current) is true, which means rcu runs: > /* force scheduling for rcu_qs() */ > resched_cpu(0); > > the task is set idle in sched_init() -> init_idle() and never changed, > afaict. Should calling init_idle() be deferred until after interrupts are all set up?