Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1713824lqb; Sun, 26 May 2024 13:52:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWf3EbvZWYm+PEaULgD1KFb+pJxw8xN6Q6CeWGmN770lFkDHbMR/Y1y8P04J82mKp9vEeshBTriaWPpASDc6MkS+lOIt4WUneUTer6YlQ== X-Google-Smtp-Source: AGHT+IFZ80r30gBXahb3IwTz0twvUkMrNEWaiYnIKhdgB/lgz63k4/hHd0uknWfp6S30jiEkps1R X-Received: by 2002:a05:6a20:7352:b0:1b0:25b6:a78b with SMTP id adf61e73a8af0-1b212e02f56mr9735042637.49.1716756760168; Sun, 26 May 2024 13:52:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716756760; cv=pass; d=google.com; s=arc-20160816; b=NTSC4mFcUiMmOYuQDyYLzZKbY8wy3EEEWCLItpWd5G44avmE7HP+1Fz0IABWeNc4g2 u40pzh3K/t6GpR+pXXkAdORxi7WOmc9kI2IEjGfjYf7R88Lwi/xlCeAz6BjnVJpDfXXO mFUxhKt3NjnZIg8LY7IM3geT3/bk2uUQTmrcLdY3A7e7gsfIe7EdR/S47FCDs3zFKGDm JkvkMSv/N1Z1+3e+CTpuQ5Vyj5GawrzWF98belGQX5BLiRCvV+yP3DDvbLAAm5KJIH/+ J0z+bevX+tccAiRi7QSCDY2mmk0U/XDw0M+zjDoMBvTPHSv7kKfnRsQ/j2j97s2l3IyK Nfkg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=iZGwwgOvwZHHY10pjQDBz6jX8rIY7WJmXFEsLeddlBg=; fh=jl9scrPkBR4ieL6VwYO3hFybKBAqaka/Z0uY6lxD/fQ=; b=GdXtAjvOeFfqgNZ5VtayHY3Ft5yU5CiZM0DXxPEUWKUKNM70RP9P8A7jgd/zn5NRwa P2fJ2b7GDLRhmPzZHKR7P55a4z74yOUX1n4irqcyaQQgOJrKG37nFvYiPRngkHbBrDzM dzWai04LULDtze/oea3WrDRgzexZ3e4jH3gsNkFPnLSpP0OBnvfq3dUxp+f4Mw6DBkON u7DR+fJ2roxZz04Vb/OSQnJ4oQ5Pp8aDwDiRFzkiJl9s4qqVUM3wcHrJSugyhnlHKDZz qILZ79uYV29axwJgRw/SRvnV/NWj5Kx7S61Rwz5TpggcFx4cKWeN0x5vhnsBy3QcRMjT 5G2w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=p2Vpn1mp; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-189869-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189869-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f8fcfd7f81si5102731b3a.212.2024.05.26.13.52.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 May 2024 13:52:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-189869-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=p2Vpn1mp; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-189869-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189869-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id A33352810C3 for ; Sun, 26 May 2024 20:52:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8E716139D05; Sun, 26 May 2024 20:52:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="p2Vpn1mp" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA6851A2C26 for ; Sun, 26 May 2024 20:52:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716756753; cv=none; b=hzlVi4/K4+g99XHG24xhWBmsKs1ja8FJFwBbBS2yFKYBIFpKzMrF19NLk+4oBhkykw77IuBeM9/u9MJ76IVuPJJYQYD2o94w3087BrKyLn5W1h8h0ac3V35M8T1JzahYlDK6cWIsVPFBL3gNH1Z3bdCn84UY6l7cHZXbXu+SIiU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716756753; c=relaxed/simple; bh=L0GLl0GqT5KmujDvu3QSZG4872mpUUMeYFAAIFtjrnQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=sQaP6i9V8jP8V1j6ovH7iuZTN0/KHv9xL7nQGPqm1cDa+cWjKTNiojgQ4gtTEDB4EUrei5t/P6sPlp8htFhN3qXCiA7vS6tTqNAB/UWvDsYbV2UtyzmpcNOOazEYCXbjowlB+A3MhBWE8eyGpNc4cnLsydox9tPm6vwNoHR8Z4E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=p2Vpn1mp; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7EC0C2BD10; Sun, 26 May 2024 20:52:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716756753; bh=L0GLl0GqT5KmujDvu3QSZG4872mpUUMeYFAAIFtjrnQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=p2Vpn1mp7Fp4ef7Lozmnx1r7aazDoes1f9s+lCOW6NoO6F18lYAqT9denSsN77xhC EiNaCcQmhTUBvVSCLGtutAMl7ljy1eS5RvoQBJ58On84GHH4duHCne2REiOD+9rTS/ 1HeHa6ovPWYq1k7lWaV+uySHyEf5CizigU9odTLhG59LU7cJjDUwdjZSZiIAta0R+G TEx9V3DJjcciqMCwB9Qg897Dxdnec9otqOVxpm5tlo/HEh+iPJVaFgx/NCL1GZvnNK MzJO7WbM4V1V8zceFg7a/OzrMnbSE6zrWrdPxCGuzaYSapHGqbaliNThGkZmTFpbD0 bmsqnWbYIscsQ== Date: Sun, 26 May 2024 22:52:30 +0200 From: Frederic Weisbecker To: Oleg Nesterov Cc: Thomas Gleixner , Ingo Molnar , Nicholas Piggin , Peter Zijlstra , Phil Auld , Chris von Recklinghausen , linux-kernel@vger.kernel.org Subject: Re: sched/isolation: tick_take_do_timer_from_boot() calls smp_call_function_single() with irqs disabled Message-ID: References: <20240522151742.GA10400@redhat.com> <20240523132358.GA1965@redhat.com> <87h6eneeu7.ffs@tglx> <20240524183700.GA17065@redhat.com> <87v832dfw1.ffs@tglx> <20240526192758.GA21193@redhat.com> 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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240526192758.GA21193@redhat.com> Le Sun, May 26, 2024 at 09:27:58PM +0200, Oleg Nesterov a ?crit : > > So up to this point the tick is never stopped neither on housekeeping > > nor on NOHZ FULL CPUs: > > > > tick_nohz_full_update_tick() > > if (!tick_sched_flag_test(ts, TS_FLAG_NOHZ)) > > return; > > OK... But tick_nohz_idle_update_tick() doesn't check TS_FLAG_NOHZ and > the tick_nohz_full_cpu() check can't help at boot time. Yes but tick_nohz_idle_update_tick() is only called when the tick is already stopped. And for the tick to be already stopped, TS_FLAG_NOHZ must have been set. > And I still don't understand why we can rely on can_stop_idle_tick() even > in tick_nohz_idle_stop_tick(). Not sure I follow you on this one... > > I'll try to read this code again tomorrow, but it will never fit my poor > little brain ;) You understood more than I ever did in just a few hours :-) But yes the tick code was much more simple before I put my own hands inside. nohz_full and cpuidle did not arrange it. Thanks.