Received: by 2002:ab2:2994:0:b0:1ef:ca3e:3cd5 with SMTP id n20csp411358lqb; Thu, 14 Mar 2024 15:11:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVjYSIwcOE2t9WmrfSXD6eHCA1E/837xLyiIvc4Xye5U14hWvLtEXXFEBW6O27iEZEkScGK5C8sKtIeb+hvUlr8na0+5/hZV2Z7MGFSdw== X-Google-Smtp-Source: AGHT+IEtylc67Xw/fj+tC7Fa/z7kT2JwjHphv1lNu22e+cMblTjM5pFwSKxaNaV1XqogpzDCx448 X-Received: by 2002:a05:6808:f08:b0:3c3:5af2:d9ac with SMTP id m8-20020a0568080f0800b003c35af2d9acmr2468236oiw.41.1710454260903; Thu, 14 Mar 2024 15:11:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710454260; cv=pass; d=google.com; s=arc-20160816; b=M+4Em7fqvBoLrwFkA2eb7az/VP8vQTfVXCp7N/zU+9GI8l9AiMhbNfWHf7o24I9npm z1q8COd57OjoiwtoSvyLmKD9ocSZEesvpIHze+B3jZ7l62lJjB5AF7YrsrO0gadHAS0U 7H+6ULeLxCV/zM1LW9OAV7l2Vc3xRz7s08iBWgASuEiBmEP7HZUl1wNwN1wrhvwF3Kqv knrGw0NNI4uE/v3KTVNPzSDn5MfFIRuRauWnV14iUzor12j2yQaYHA+Ta7HcQiKBKcJc W/yCsRK9+PSzAuiwDRmox8UKEVsYKWm0+kIR+9pF65ucqwSVeQErzPY+WZlVHfI6P+Au dC3w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:feedback-id:dkim-signature; bh=CCh3dqJRCdjU6eonAORaNe6PS7ViDsSNXUXdZHK162c=; fh=sbPAWnkm4QcIfJZq+fIaJ7zjyUOdwxt3P8qavoXz+J0=; b=Gk9wllhGTXm3Z7ofD3h67Xr+WP8r6CIDHhIW7VfUx1HYeXomlNeIOA7EUS2GHmWLCP VSo6hL8bMsDprZdPrZvqYYj+jOvWwCzOpinPNO22uuh0saxbOR9gb28ZP0iaqaPXbkFS mya+7fbCwfbtOpOlpA5tb18v/MQDcMz3yB9zMe4kIMy4vSaMaLv9cx0J/bCavVmRDHl7 tcexesZ3MiWdRQlK/HPdKAXC48pu62uM6fxfjmQ67LRdiWdEBmWwjZVcWuhjSGSchtZ3 D1EBCqllfymMJeaAetP2iqUPbt1JxWVUnJUa3ELfqpXF24qCYHUvxM+QkZmyvFPmYjq7 3H4A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=hma04Grk; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-103827-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-103827-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id v8-20020a05622a144800b0042f26f6276bsi2350637qtx.563.2024.03.14.15.11.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Mar 2024 15:11:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-103827-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=hma04Grk; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-103827-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-103827-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7C7371C215E3 for ; Thu, 14 Mar 2024 22:11:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B5E3C768F8; Thu, 14 Mar 2024 22:10:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hma04Grk" Received: from mail-qt1-f169.google.com (mail-qt1-f169.google.com [209.85.160.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 200EB76414; Thu, 14 Mar 2024 22:10:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710454252; cv=none; b=l9aGX+vgFlU/ncVReqlSHoHUx5BYMBAhan6l958EKs665USPadpbfE0lA1tRIsNKUJ4JbJgNA6dcZsJxppdnvQa3DIscUq/1zW2OztwjsXFkL4c8UsA5DiTXxEvyDENKzT1qbDxBbeeEKKSnPwrpQhVXW+tqVVazQt/SEcj3RxY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710454252; c=relaxed/simple; bh=OkWcBnsiYG75IDHlAI5T+Gku1wq896+L4GdKgwLV3Po=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FWM3qTKDPLs/fGoT8UKoIhP7vbnYiAqW0PIRC5BaDfSSq5/bcCf0p5Kgx/Md1yL7Qw06guv2SBg8gPunTBX62ved4Wh2YlMeijMKLffrbwOON3ackvtcqeLQDm/BaZ9bmpk0mj5XmE8UI9U0GCVGiNU2SBP6GMmKxpd2/GTjCm8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=hma04Grk; arc=none smtp.client-ip=209.85.160.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qt1-f169.google.com with SMTP id d75a77b69052e-42a029c8e62so9846201cf.1; Thu, 14 Mar 2024 15:10:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710454250; x=1711059050; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:from:to:cc:subject:date :message-id:reply-to; bh=CCh3dqJRCdjU6eonAORaNe6PS7ViDsSNXUXdZHK162c=; b=hma04Grk/aHg2NQgGryrLC7jmZvxOwTKtwApQZxuSZYiYC8EQ+cFz1n3do3n3F+KIK 9jEFHuDrp5p7rgCJl/6bozS1CAEbekwHA6+QjCP0RUEKszkJDFzlqwD0s8mmh5xtF4rJ RSf4ex1E7VYoW6RPcczVS4KsxQ/ztkO1Q1u4ywkNZeUpwNI14twA04FfOJr0+1BfWsvt YUoW+EQGtPXJBMuUt2HNeBqvVF7a52KTuY91mzljqqn3YRd702RQyylcdWbX3uokttWz n30anQBIi6VsCQj3i0h+d7X6ZSosFANV6MY6s9pJhcKJ5kAozX2AEeSheG/Ab9UNk82W tWkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710454250; x=1711059050; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CCh3dqJRCdjU6eonAORaNe6PS7ViDsSNXUXdZHK162c=; b=r7rpJN40bvUqCqUMMapFUGmTHj2M8LWa3smv15fqRyoPpjcqiZNbsxL/f2397x25UZ ep0C0Ek0ix2iYstKqShHzjUF/KHhG8r9ALuqARby0BBvMG5oZIhHVsAmXvIEF2wkDLCM X1xbNghg6pCrd6uc/S0Ql9AvLOI7Lr/qhEHl4YIWbeihr04zVfQ4/XTAGqOJ5iRwltDJ gFdHuv5xmSdV0WdOxmT3gsCOLNadnge3jxhyQJx0zbf18JecFW5nwOMTi1UjPEixvV1S VSElZxEedAn+fgrdv3k/wW59vHkJfRPLsgnI8Utj3s0xPIhPZaals7OZsKBWfNjudsT5 sjyQ== X-Forwarded-Encrypted: i=1; AJvYcCXqEsXdx1NxK2Rm4evKbEpaGaY32g+OTJPwzR5+4XwsF6WiEfnw4tZVgYiJ7HW3+ekFcYFv1KirT5OJhaXmiWKGdjX57jDLgLwSbC3I+knMQ8qjjtgc4OyWFy09Wp6YrNUT X-Gm-Message-State: AOJu0YwOX3W1NcKzL3e7QJXZZ3KmPk/GY8+/IlpIxHkDSiZ8i75Tzxyp IxtrpiWHFWebWCbicwQYd8USOSl+f5TEGWlC4B+h2f2VK/yK2RO2 X-Received: by 2002:a05:622a:5807:b0:430:a089:a13d with SMTP id fg7-20020a05622a580700b00430a089a13dmr2619640qtb.2.1710454250038; Thu, 14 Mar 2024 15:10:50 -0700 (PDT) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com. [66.111.4.227]) by smtp.gmail.com with ESMTPSA id s15-20020a05622a178f00b00430a07fb03asm931440qtk.0.2024.03.14.15.10.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Mar 2024 15:10:49 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailauth.nyi.internal (Postfix) with ESMTP id 0F3BD27C005B; Thu, 14 Mar 2024 18:10:49 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 14 Mar 2024 18:10:49 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrjeejgdduheehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepuehoqhhu nhcuhfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucggtffrrg htthgvrhhnpefftdeihfeigedtvdeuueffieetvedtgeejuefhhffgudfgfeeggfeftdei geehvdenucffohhmrghinhepghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepsghoqhhunhdomhgvshhmthhprghuthhh phgvrhhsohhnrghlihhthidqieelvdeghedtieegqddujeejkeehheehvddqsghoqhhunh drfhgvnhhgpeepghhmrghilhdrtghomhesfhhigihmvgdrnhgrmhgv X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 14 Mar 2024 18:10:47 -0400 (EDT) Date: Thu, 14 Mar 2024 15:10:41 -0700 From: Boqun Feng To: Thomas Gleixner Cc: Florian Fainelli , Frederic Weisbecker , "Russell King (Oracle)" , Joel Fernandes , Anna-Maria Behnsen , Linus Torvalds , linux-kernel@vger.kernel.org, kernel-team@meta.com, paulmck@kernel.org, mingo@kernel.org, rcu@vger.kernel.org, neeraj.upadhyay@amd.com, urezki@gmail.com, qiang.zhang1211@gmail.com, bigeasy@linutronix.de, chenzhongjin@huawei.com, yangjihong1@huawei.com, rostedt@goodmis.org, Justin Chen Subject: Re: Unexplained long boot delays [Was Re: [GIT PULL] RCU changes for v6.9] Message-ID: References: <533151c9-afb5-453b-8014-9fbe7c3b26c2@gmail.com> <87v85olez3.ffs@tglx> <87sf0sldbi.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Mar 14, 2024 at 03:05:53PM -0700, Boqun Feng wrote: > On Thu, Mar 14, 2024 at 10:21:21PM +0100, Thomas Gleixner wrote: > > On Thu, Mar 14 2024 at 21:45, Thomas Gleixner wrote: > > > On Thu, Mar 14 2024 at 12:09, Florian Fainelli wrote: > > >> https://gist.github.com/ffainelli/cb562c1a60ef8e0e69e7d42143c48e8f > > >> > > >> this one is does include the tmigr events. Thanks! > > > > > > You need 8ca1836769d758e4fbf5851bb81e181c52193f5d too. > > > > So from the above trace it's clear where it goes south: > > > > [ 236.318158] -0 3..s.. 2928466us : tmigr_handle_remote: group=aecb05cb lvl=0 > > [ 236.326526] -0 3d.s.. 2928467us : tmigr_handle_remote_cpu: cpu=0 parent=aecb05cb wakeup=9223372036854775807 > > [ 236.357809] -0 3d.s.. 2928469us : tmigr_update_events: child=00000000 group=aecb05cb group_lvl=0 child_active=0 group_active=8 nextevt=3103000000 next_expiry=2934000000 child_evt_expiry=0 child_evtcpu=0 > > > > [ 236.377222] -0 0dn... 2928471us : tmigr_cpu_active: cpu=0 parent=aecb05cb wakeup=9223372036854775807 > > [ 236.387765] -0 0dn... 2928471us : tmigr_group_set_cpu_active: group=aecb05cb lvl=0 numa=0 active=9 migrator=8 parent=00000000 childmask=1 > > > > [ 236.401526] -0 0d.... 2928477us : tmigr_update_events: child=00000000 group=aecb05cb group_lvl=0 child_active=0 group_active=8 nextevt=3103000000 next_expiry=2934000000 child_evt_expiry=0 child_evtcpu=0 > > [ 236.420940] -0 0d.... 2928478us : tmigr_group_set_cpu_inactive: group=aecb05cb lvl=0 numa=0 active=8 migrator=8 parent=00000000 childmask=1 > > [ 236.434874] -0 0d.... 2928478us : tmigr_cpu_idle: cpu=0 parent=aecb05cb nextevt=3103000000 wakeup=9223372036854775807 > > > > [ 236.446896] -0 3d.... 2929469us : tmigr_group_set_cpu_inactive: group=aecb05cb lvl=0 numa=0 active=0 migrator=ff parent=00000000 childmask=8 > > [ 236.460916] -0 3d.... 2929470us : tmigr_cpu_idle: cpu=3 parent=aecb05cb nextevt=9223372036854775807 wakeup=9223372036854775807 > > [ 236.473721] -0 3d.... 2934471us : tmigr_cpu_new_timer_idle: cpu=3 parent=aecb05cb nextevt=9223372036854775807 wakeup=9223372036854775807 > > > > CPU3 is the last active CPU and goes idle. So it should take care of the > > pending events, but it does not. > > > > I notice CPU3 didn't have its own non-deferrable timer queued (local or > global), so could the following happen? > > timer_base_try_to_set_idle(): > __get_next_timer_interrupt(): > fetch_next_timer_interrupt(): > // nextevt_local == nextevt_global == basej + NEXT_TIMER_MAX_DELTA > // tevt->local == tevt->gloabl = KTIME_MAX > timer_use_tmigr(): > tmigr_cpu_deactivate(): > __tmigr_cpu_deactivate(): > // tmc->cpuevt.ignore untouched still == true > walk_groups(&tmigr_inactive_up, ...): > tmigr_inactive_up(): > data->remote = true; this line is data->remote = false; in the real code. > tmigr_update_events(): > if (child) { // child is NULL > ... > } else { > first_childevt = evt = data->evt; > > if (evt->ignore && !remote) > return true; // no remote tick is picked. > ... > } > > Regards, > Boqun > > > This is the next trace entry where CPU0 magically comes back to life. > > > > [ 236.487393] -0 0d.s.. 162001359us : timer_cancel: timer=8c725d84 > > > > 8ca1836769d758e4fbf5851bb81e181c52193f5d is related, but dos not fully > > explain the fail. I haven't yet spotted where this goes into lala land.