Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp2827246rdb; Tue, 12 Sep 2023 13:24:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGHO0amNbiQ7yFMyowX+fWqAD1Nq/8CS6n/ajZ0TTpbDB+v5REhr9tsayMn6TgQAubZSkol X-Received: by 2002:a05:6a00:1787:b0:68f:edfd:2ac6 with SMTP id s7-20020a056a00178700b0068fedfd2ac6mr1065341pfg.0.1694550285237; Tue, 12 Sep 2023 13:24:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1694550285; cv=pass; d=google.com; s=arc-20160816; b=PIvbwaBMeujPRa5oL55WmwUcnIpkXiCbEUjyLGAiNdOHEQ2w7VmB/AgXEnIXlKmlQx iFhcbzs9Sp+t4B8KwmCmjo13qH3CXGZ1dsllKYCf6Ns2PYVMAnN4D+i2aUfRO9dO6Oxd zXN6VCSLLEmbAZuCSn7QzQakddbUINIexnDdK6t9HyKfIv5+9iqotytnLhoIEyp2iQK+ nXc16HFvBFVfpG8qiJ7Iqi5cEzFXT6YZflDH6PaNKH/H+4Sdaebhg56SRyMbNs7D4Uuo 7kZNxMXCUOvGLz3UP8QVQOru/QNhMLYDBIzgJhVtzKIIVFRWg99Cx5EmaC2T5mgVxqLf mqdA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:in-reply-to :content-transfer-encoding:content-disposition:references :mail-followup-to:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=Tj/gFuuG4jaZj67ZiEqOoa2wPo0OafneQf6oUwowvZE=; fh=Ji+BOddVOO0D1e0Li8cOH1Jldcw1Q3U+zx7GIqLLTzs=; b=UzIJaSYEkSwVf/mcAE1VcTZ44xvVtTVelVqB+aI8edLTcYFz+ngmx0SvaAS0zV3kna M82Wewm5A0lA7Q6isSTIUH0bn4RB75VG4C4x5KGe++8/YoglfFwwTxz/8Zt07c1pZ1HF ez8yQgzW07bEXBLhmDgVidYPd0knHw4JIQIS7gPVIob5iaTdfSM8cMyKlRCUZzBRU81h UbZynQKDl6BGHhQoNjfDXnN238AIf12uQcrypMkRDIlXjSN9nPr/Z6qWorzTwYMj/nZg ccb/ZKoTcAPh3KTkIBoKynRqTHKhTogduShyIZvedKirmfZbsrKPcpt4UZJoNRe81ZoM taWg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b="Bt/ircFP"; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=AMNrgtCO; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id c11-20020a63ef4b000000b0056949c3eda8si8183978pgk.119.2023.09.12.13.24.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 13:24:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b="Bt/ircFP"; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=AMNrgtCO; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id A2DFA809D331; Tue, 12 Sep 2023 08:45:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236276AbjILPpN (ORCPT + 99 others); Tue, 12 Sep 2023 11:45:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232571AbjILPpM (ORCPT ); Tue, 12 Sep 2023 11:45:12 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25A4010DE; Tue, 12 Sep 2023 08:45:08 -0700 (PDT) Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38C9nbLK006500; Tue, 12 Sep 2023 15:44:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : content-type : content-transfer-encoding : in-reply-to : mime-version; s=corp-2023-03-30; bh=Tj/gFuuG4jaZj67ZiEqOoa2wPo0OafneQf6oUwowvZE=; b=Bt/ircFPA4LhZWZPbidk27C9GZv7M59axWpUUW6uvTJnPE4LNACx5HfnJwb58lz1uIf9 tezvBXNQxABJLoZh5q+Qt1br7GkQsiigkqI+48+azzlwsYbxX0kgLYBmZ+ul1CVrtomE pZLTO5QZzR17mi1Ei2DiqfqaxnQ4MDqR53PSOFBXqj+gJlWQNdGOZUtwARYYxReMeaLA psHll3PXcMD17ty95T6Wy5MqUkwbgo4kO1KaMnYNZKC7vQSk1vOD+NCQ39IdNMqFMXeY ivwBLu8fztwdkPLih6Nb+JyEVXSJCUMSpd1FVmtPBlxNubtIaBWndqQe3ECS3ctlWOeU vQ== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3t1jwqv9bk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 12 Sep 2023 15:44:47 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 38CEhwHt002750; Tue, 12 Sep 2023 15:44:29 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2103.outbound.protection.outlook.com [104.47.58.103]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3t0f5c6s54-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 12 Sep 2023 15:44:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mTGFu+1WUP8pw9SJT9JEzEbzY5FCRGj+gqewoDOnC9q3uv3uFtP7A8AjFte/JNFQ4xB051qO8aU+8G4zD3KeLl2cDTfGRn8+vVAHBjmJSUVpSwuurGZbjTcWQ1iRHkoFFYX/JvmghNqSFHR76xrZDxSXGNKA4ouGo6YN+U3XrWje69IKNNd2fed1HAvc1GvAu6rCuC9W/9YbCA8Mt+GwRr8zxgHTNjeusylKv74aVfYybGeGWWl88NGlRdbW7wlkxZjsO+Vzc2Kc/0zcYA5L7G6Ns7/y0gjrO6Dq/jpUVLRW7r7TBhR3Xb8C0haBhOa7UK9PupVjQ1fE7ooOC65mpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Tj/gFuuG4jaZj67ZiEqOoa2wPo0OafneQf6oUwowvZE=; b=I4WGuRSXX9S/DW9lIN/IgM53dbTmTdwH0d9qnvpPaFyFJaM8kNDWbUMZ7AFdFlXwl9kN6jlvRs+DYYmNVp98YVo/PZeJHXeiEoXzRsGdjzU1fvhubbP7VVPeQQd+IVbYscbrZdvFM6kAchGJ7xVGilOE2pd/h6IwNUYNo93JHNVgY1YTvYBkknypUrl2tGCg5OJfgui2pKbG/RKiTFOaQW2LHHX7h9edv2NWPd8x9a7OazTgOtZY18thQXJ53JlYdyjUl2DfqmlzCaNOjqgNbJAsQwxeQaxgtJLWRxClAwe99fUy1wHKMFSJSQS/LBHsUokO4OE1nnI6dlvbrI7hiQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Tj/gFuuG4jaZj67ZiEqOoa2wPo0OafneQf6oUwowvZE=; b=AMNrgtCOaRHmeaykMGRQGoutc2ri84eUMAHTmsMB+PgwUihqLs21rbN/ZrUD8LmYij79V379Xn84lGB2VFpmyeJ+rIfOqQnNbfSbiHfNLXX70w5Y4ci4hm9fSnlezGPXXgSga9hF5wKoIRQMK3gB0F0pm0B4zkml9BlqL6qL21U= Received: from SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) by DM4PR10MB6280.namprd10.prod.outlook.com (2603:10b6:8:bb::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Tue, 12 Sep 2023 15:44:27 +0000 Received: from SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::8979:3e3f:c3e0:8dfa]) by SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::8979:3e3f:c3e0:8dfa%4]) with mapi id 15.20.6768.036; Tue, 12 Sep 2023 15:44:27 +0000 Date: Tue, 12 Sep 2023 11:44:23 -0400 From: "Liam R. Howlett" To: "Paul E. McKenney" Cc: 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: <20230912154423.gcb5rzwzh4jbcaw7@revolver> Mail-Followup-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 References: <20230906172954.oq4vogeuco25zam7@revolver> <495849d6-1dc6-4f38-bce7-23c50df3a99f@paulmck-laptop> <20230911235452.xhtnt7ply7ayr53x@revolver> <33150b55-970c-4607-9015-af0e50e4112d@paulmck-laptop> <62936d98-6353-486e-8535-86c9f90bc7f4@paulmck-laptop> <20230912135617.dnhyk4h5c555l2yg@revolver> <9e85adf9-2e1f-4bed-a58e-9ca629c03579@paulmck-laptop> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <9e85adf9-2e1f-4bed-a58e-9ca629c03579@paulmck-laptop> User-Agent: NeoMutt/20220429 X-ClientProxiedBy: YT4PR01CA0126.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:d5::14) To SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR10MB3022:EE_|DM4PR10MB6280:EE_ X-MS-Office365-Filtering-Correlation-Id: 5dc38963-bcf8-479f-c58a-08dbb3a724f2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: e5aBf3j4Qd8HRgs3qw0W7bKRxPLXb5t9lOFrCoHoUDpvF8nVFUv8Kf8UgJ5fTHm5NVq8nZbY75OLFA/U2cfb3f/KEdlS1NW2fpZR03KgUi+WjuXkiKIRoS8vgZFQq9TJTqdtKFadYbSsg9wdUm2cCQuQeDrk2XenMdsJBiB3KNdbbywyty3xC1p8h8Iyk9V2pUUZpKRhP4YVmnRzlGZk0F5AdmSydzfHnO4q8qY5AhFJ77CWjbPD9Fb2x5ZGxjewyGleCv4zreA1UX6b5LVe4PJu0ico05PRNGpyhz7n/tStGSFrzzN/HXMQrPhar+EC+AfVZdDXu3OWyqw4lz6eh4Fgyqggb9LliRxupurOd+LU4YI2/TfnQMh1WHxQta7471e0NZvBt6PXkT7Z0Fi1idUJJf4yb/rDIMFT0UFihpZ2wlbBXy6RvmMDrKWwQpJB3Ihqisw0GpRIKzJ0RsmU742gpcTsgUe82pD7VjduAwOwHDDz4n/v7PeW046GtH6PaU2l/5hzDXyIBKCsGzyumM8QXbNl/YX0QN2MEpq7WoI= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR10MB3022.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(7916004)(39860400002)(346002)(376002)(396003)(366004)(136003)(1800799009)(186009)(451199024)(2906002)(6506007)(6666004)(53546011)(6486002)(966005)(6512007)(9686003)(478600001)(83380400001)(1076003)(26005)(66946007)(6916009)(54906003)(33716001)(66476007)(316002)(66556008)(41300700001)(4326008)(8936002)(8676002)(5660300002)(86362001)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: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sSW93cjJ4Yjh1SURRN0o1MCtzZnZxQWJUZWtM?= =?utf-8?Q?TOjSGsu2XrX7nSozyFbEeZ+NdJHyMmfLla?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5dc38963-bcf8-479f-c58a-08dbb3a724f2 X-MS-Exchange-CrossTenant-AuthSource: SN6PR10MB3022.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Sep 2023 15:44:27.2962 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: xGUYQbj3R45iKQOfl0iLuzJAOrXWF//TuGT54tn4ZJIGVus78nzudlc76lD9zHGxFAN8tQChxbr9SBS2G/7geg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR10MB6280 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-12_14,2023-09-05_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxscore=0 bulkscore=0 adultscore=0 phishscore=0 spamscore=0 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309120130 X-Proofpoint-ORIG-GUID: EjioiGn-ojNXW1UFpRuBYxlqhFoRC967 X-Proofpoint-GUID: EjioiGn-ojNXW1UFpRuBYxlqhFoRC967 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 (agentk.vger.email [0.0.0.0]); Tue, 12 Sep 2023 08:45:20 -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 agentk.vger.email * Paul E. McKenney [230912 11:07]: > On Tue, Sep 12, 2023 at 09:56:17AM -0400, Liam R. Howlett wrote: > > * Paul E. McKenney [230912 06:00]: > > > On Tue, Sep 12, 2023 at 10:34:44AM +0200, Geert Uytterhoeven wrote: > > > > Hi Paul, > > > >=20 > > > > On Tue, Sep 12, 2023 at 10:30=E2=80=AFAM Paul E. McKenney wrote: > > > > > On Tue, Sep 12, 2023 at 10:23:37AM +0200, Geert Uytterhoeven wrot= e: > > > > > > On Tue, Sep 12, 2023 at 10:14=E2=80=AFAM Paul E. McKenney wrote: > > > > > > > On Mon, Sep 11, 2023 at 07:54:52PM -0400, Liam R. Howlett wro= te: > > > > > > > > * Paul E. McKenney [230906 14:03]: > > > > > > > > > On Wed, Sep 06, 2023 at 01:29:54PM -0400, Liam R. Howlett= wrote: > > > > > > > > > > * Paul E. McKenney [230906 13:24]: > > > > > > > > > > > On Wed, Sep 06, 2023 at 11:23:25AM -0400, Liam R. How= lett wrote: > > > > > > > > > > > > (Adding Paul & Shanker to Cc list.. please see belo= w for why) > > > > > > > > > > > > > > > > > > > > > > > > Apologies on the late response, I was away and have= been struggling to > > > > > > > > > > > > get a working PPC32 test environment. > > > > > > > > > > > > > > > > > > > > > > > > * Geert Uytterhoeven [230829= 12:42]: > > > > > > > > > > > > > Hi Liam, > > > > > > > > > > > > > > > > > > > > > > > > > > On Fri, 18 Aug 2023, Liam R. Howlett wrote: > > > > > > > > > > > > > > The current implementation of append may cause = duplicate data and/or > > > > > > > > > > > > > > incorrect ranges to be returned to a reader dur= ing an update. Although > > > > > > > > > > > > > > this has not been reported or seen, disable the= append write operation > > > > > > > > > > > > > > while the tree is in rcu mode out of an abundan= ce of caution. > > > > > > > > > > > > > > > > > > > > > > > > ... > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ... > > > > > > > > > > > > > > > > > > > > > RCU-related configs: > > > > > > > > > > > > > > > > > > > > > > > > > > $ grep RCU .config > > > > > > > > > > > > > # RCU Subsystem > > > > > > > > > > > > > CONFIG_TINY_RCU=3Dy > > > > > > > > > > > > > > I must have been asleep last time I looked at this. I was lo= oking at > > > > > > > Tree RCU. Please accept my apologies for my lapse. :-/ > > > > > > > > > > > > > > However, Tiny RCU's call_rcu() also avoids enabling IRQs, so = I would > > > > > > > have said the same thing, albeit after looking at a lot less = RCU code. > > > > > > > > > > > > > > TL;DR: > > > > > > > > > > > > > > 1. Try making the __setup_irq() function's call to mutex= _lock() > > > > > > > instead be as follows: > > > > > > > > > > > > > > if (!mutex_trylock(&desc->request_mutex)) > > > > > > > mutex_lock(&desc->request_mutex); > > > > > > > > > > > > > > This might fail if __setup_irq() has other dependenci= es on a > > > > > > > fully operational scheduler. > > > > > > > > > > > > > > 2. Move that ppc32 call to __setup_irq() much later, mos= t definitely > > > > > > > after interrupts have been enabled and the scheduler = is fully > > > > > > > operational. Invoking mutex_lock() before that time = is not a > > > > > > > good idea. ;-) > > > > > > > > > > > > There is no call to __setup_irq() from arch/powerpc/? > > > > > > > > > > Glad it is not just me, given that I didn't see a direct call, ei= ther. So > > > > > later in this email, I asked Liam to put a WARN_ON_ONCE(irqs_disa= bled()) > > > > > just before that mutex_lock() in __setup_irq(). > >=20 > > I had already found that this is the mutex lock that is enabling them. > > I surrounded the mutex lock to ensure it was not enabled before, but wa= s > > after. Here is the findings: > >=20 > > kernel/irq/manage.c:1587 __setup_irq: > > [ 0.000000] [c0e65ec0] [c00e9b00] __setup_irq+0x6c4/0x840 (unreliabl= e) > > [ 0.000000] [c0e65ef0] [c00e9d74] request_threaded_irq+0xf8/0x1f4 > > [ 0.000000] [c0e65f20] [c0c27168] pmac_pic_init+0x204/0x5f8 > > [ 0.000000] [c0e65f80] [c0c1f544] init_IRQ+0xac/0x12c > > [ 0.000000] [c0e65fa0] [c0c1cad0] start_kernel+0x544/0x6d4 > >=20 > > Note your line number will be slightly different due to my debug. This > > is the WARN _after_ the mutex lock. > >=20 > > > > > > > > > > Either way, invoking mutex_lock() early in boot before interrupts= have > > > > > been enabled is a bad idea. ;-) > > > >=20 > > > > I'll add that WARN_ON_ONCE() too, and will report back later today.= .. > > >=20 > > > Thank you, looking forward to hearing the outcome! > > >=20 > > > > > > Note that there are (possibly different) issues seen on ppc32 a= nd on arm32 > > > > > > (Renesas RZ/A in particular, but not on other Renesas ARM syste= ms). > > > > > > > > > > > > I saw an issue on arm32 with cfeb6ae8bcb96ccf, but not with cfe= b6ae8bcb96ccf^. > > > > > > Other people saw an issue on ppc32 with both cfeb6ae8bcb96ccf a= nd > > > > > > cfeb6ae8bcb96ccf^. > > > > > > > > > > I look forward to hearing what is the issue in both cases. > > > >=20 > > > > For RZ/A, my problem report is > > > > https://lore.kernel.org/all/3f86d58e-7f36-c6b4-c43a-2a7bcffd3bd@lin= ux-m68k.org/ > > >=20 > > > Thank you, Geert! > > >=20 > > > Huh. Is that patch you reverted causing Maple Tree or related code > > > to attempt to acquire mutexes in early boot before interrupts have > > > been enabled? > > >=20 > > > If that added WARN_ON_ONCE() doesn't trigger early, another approach > > > would be to put it at the beginning of mutex_lock(). Or for that mat= ter > > > at the beginning of might_sleep(). > >=20 > > Yeah, I put many WARN() calls through the code as well as tracking down > > where TIF_NEED_RESCHED was set; the tiny.c call_rcu(). > >=20 > >=20 > > So my findings summarized: > >=20 > > 1. My change to the maple tree makes call_rcu() more likely on early bo= ot. > > 2. The initial thread setup is always set to idle state > > 3. call_rcu() tiny sets TIF_NEED_RESCHED since is_idle_task(current) > > 4. init_IRQ() takes a mutex lock which will enable the interrupts since > > TIF_NEED_RESCHED is set. > >=20 > > I don't know which of these things is "wrong". >=20 > Doing early-boot call_rcu() is OK. >=20 > The initial thread eventually becomes the idle thread for the boot CPU. > See rest_init() in init/main.c. >=20 > I can certainly make Tiny call_rcu() refrain from invoking resched_cpu() > during boot, as shown in the (untested) patch below. This might result i= n > boot-time hangs, though. If we set the current thread as !idle, then we don't need to add overhead to every call_rcu(), and you've already tracked down where I need to change the flags back to idle. Patch below. >=20 > The thought of doing mutex_lock() before interrupts are enabled on the > boot CPU strikes me as very wrong. Others might argue that the fact > that __might_resched() explicitly avoids complaining when system_state > is equal to SYSTEM_BOOTING constitutes evidence that such calls are OK. > (Which might be why enabling debug suppressed the problem.) Except that > if you actually try sleeping at that time, nothing good can possibly > happen. Does lockdep check for SYSTEM_BOOTING as well? That could be another reason? >=20 > So my question is why is it useful to setup interrupts that early, given > that interrupts cannot possibly happen until the boot CPU enables them? I don't know for sure, but there are 'preallocated IRQs' which end up grouped 0-15, then I see another one added at 55 after the mpic console output. I suspect it's so that they can be added as they are discovered during early boot? The below is not fully tested, but qemu stops throwing the warning on boot and it doesn't add instructions to call_rcu(). ------------------------------------------------------------------------ diff --git a/init/main.c b/init/main.c index dbe1fe76be34..fd4739918a94 100644 --- a/init/main.c +++ b/init/main.c @@ -696,7 +696,7 @@ noinline void __ref __noreturn rest_init(void) */ rcu_read_lock(); tsk =3D find_task_by_pid_ns(pid, &init_pid_ns); - tsk->flags |=3D PF_NO_SETAFFINITY; + tsk->flags |=3D PF_NO_SETAFFINITY & PF_IDLE; set_cpus_allowed_ptr(tsk, cpumask_of(smp_processor_id())); rcu_read_unlock(); =20 @@ -943,6 +943,7 @@ void start_kernel(void) * time - but meanwhile we still have a functioning scheduler. */ sched_init(); + current->flags &=3D ~PF_IDLE; =20 if (WARN(!irqs_disabled(), "Interrupts were enabled *very* early, fixing it\n")) > ------------------------------------------------------------------------ >=20 > diff --git a/kernel/rcu/tiny.c b/kernel/rcu/tiny.c > index fec804b79080..f00fb0855e4b 100644 > --- a/kernel/rcu/tiny.c > +++ b/kernel/rcu/tiny.c > @@ -192,7 +192,7 @@ void call_rcu(struct rcu_head *head, rcu_callback_t f= unc) > rcu_ctrlblk.curtail =3D &head->next; > local_irq_restore(flags); > =20 > - if (unlikely(is_idle_task(current))) { > + if (unlikely(is_idle_task(current)) && system_state > SYSTEM_BOOTING) { > /* force scheduling for rcu_qs() */ > resched_cpu(0); > }