Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp696294lqb; Fri, 24 May 2024 10:16:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXujg1QzJNq1toXn246MS7ZpbfQOpwzGroG2MwOvHoNndFIj2dp9GR6x6IY8lyVCPjPtcOKuyvU3MB9ZrRljOKVRQU8TlDwLyF/b0vksg== X-Google-Smtp-Source: AGHT+IEBn70Vkk6F1MFSY7EVCbt+B2/ETQ6xwhQOjAgFdits28Lmjs/kjyiTM916bpI1FyxC/pz3 X-Received: by 2002:a17:906:c94b:b0:a62:c5f:e34a with SMTP id a640c23a62f3a-a62643ecd57mr207508466b.39.1716570989485; Fri, 24 May 2024 10:16:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716570989; cv=pass; d=google.com; s=arc-20160816; b=vxMC+FrK3IGn5MORd1O3ESCO+WpTnj7/bth71pL6YrxuBJBCWbBXFGQMo7TN8iR/Su +1Mul6vtDdMctuBvsDpTiYLJcKv+3pNTZUy9rKX8hcynB2Yiv9KtCP9rhDUK67kdDoxa ssOLtQ7bawjknfueOhPOafpSVrX8Bt0wnFlsw9EYEhE+7fMwiadAvqzkSKvFxsT9sClJ InAQq2Dq7gJioanffm5vjrUCv6GQExxTaKHtpKJQluACM3gLaSX7JU4T2Oj+2HoRTh71 38UCX5mW3bcA0uNvP8VZAn3olJu530Iep+XblMJzb3zvE2F+4v6JMVxVfYaz7kaIXAOZ pZhQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=Lh1/ZiqQOtBnGCfUA+jL+uz9J6FiB76LY/j2aJ3Lx9E=; fh=oDv8RfGxlPNZdQeqjnTGCC5W5CVECcTpVHu9gUqumuE=; b=hNc9FEkn5F+yPE4Ztjf8MJxIevS2InmRKMLDMoRng5fKGAU50YgxpGrFOkpBJFLbKW IKnK1U+Wx3yVqz08UnJZ3V39jtUJcWSkJmWd0csTyHqj8WmlsUJbbTy0DtL5Z0B5LHhe B4yyhF8P9RKvFYnufKxkF79/JW9AFmBq2wt1E2CrsYmVofctzMokN9fSGpiLoc9FCxIb cM7pmF1l7M75lwRGq423Pj8QQ0toaJKyAGXa+znyWnXySQfrSO0FwlRO0xH4EG9wu+ol j4+umY0hQcRT/eQvtovF4NdDI4GJNQ1Y33QdQdahwq2mD8b3c0CUKN8KVFDu0EhodYSX 1BrA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="CJo7IR/C"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-188965-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-188965-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a626cc644c5si98478966b.583.2024.05.24.10.16.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 10:16:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-188965-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="CJo7IR/C"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-188965-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-188965-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 38F291F20C3A for ; Fri, 24 May 2024 17:16:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EC9F612EBDF; Fri, 24 May 2024 17:16:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="CJo7IR/C"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Y04txm8U" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 B691D442F for ; Fri, 24 May 2024 17:16:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570983; cv=none; b=MagwUD58/64EXyJG8YN+W8fL8t6iWAvvcepc10Snh2cwO7HdwgcCU5KkhcQ1yylhJk6ZaCLaWTt6DWVgZW+Ul0SHxLGiB0ha8pYLqIbsgOp0kyT+n1Y2GQKDlnPKYtNfYTpELczJkbp0qYoUIwd7IDDFxQXHONFP0JD4iCt9zMk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570983; c=relaxed/simple; bh=Lh1/ZiqQOtBnGCfUA+jL+uz9J6FiB76LY/j2aJ3Lx9E=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=KrmHEU8OQ9BpalO0uscX6JzcuSuYv4MndLn0fAhNrbQbqwE/Vh1uM3/hPgW5/vR55C1ecAYo+7s1s8hkPCbT8KEyME5ydjkEtbgtG9i8203Ni1C/Xqdu6ia8Jv2SdNSbXqSbbzbp7ZGPjvjW6WFUEE79i8zP/wJGLhXw0yAQalY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=CJo7IR/C; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Y04txm8U; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1716570979; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Lh1/ZiqQOtBnGCfUA+jL+uz9J6FiB76LY/j2aJ3Lx9E=; b=CJo7IR/C2u19hzw4gvNNsArZONhriIqrB2qTmb5O/0Pv7kWazkWMDZyIMUqB7TQukaofqG tcHZT7/Y/Pq2VFty86zGLI//BgEr7P1qTwoLlLecdtEFxEbhuLrH40VyGKFrq1kyAql/Hs J8jaTB/15+dKbj+QuNGAel/e3VZ7XUT//KTbT/U1cLpawWQcYgatD8VrXQrkYTCwPpYWVp y+WKevUNS55NKXWonuy8HjgrIaXMxXGdqxxR7J+LupnFtc+8AJQoMYkzG3mHNc5Pl7jQ/M WSILhe1/g/M9vzvWRikcsE5Hxi2IJ9p6zdvS8D5p+kVU8asWLu4XrSybjcuuLA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1716570979; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Lh1/ZiqQOtBnGCfUA+jL+uz9J6FiB76LY/j2aJ3Lx9E=; b=Y04txm8UJxIuT5k6HvFCufPgGPl9myW8KJuWm3uXlTnOWx0LT90QVhabwRR4U2/mWr85ng 3T+VS5Bg7w2r8iCQ== To: Frederic Weisbecker Cc: Oleg Nesterov , 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 In-Reply-To: References: <20240522151742.GA10400@redhat.com> <20240523132358.GA1965@redhat.com> <87h6eneeu7.ffs@tglx> Date: Fri, 24 May 2024 19:16:19 +0200 Message-ID: <878qzzdtb0.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=utf-8 Content-Transfer-Encoding: quoted-printable On Fri, May 24 2024 at 17:20, Frederic Weisbecker wrote: > Le Fri, May 24, 2024 at 11:31:12AM +0200, Thomas Gleixner a =C3=A9crit : >> >> Race with tick_nohz_stop_tick() on boot CPU which can set >> >> tick_do_timer_cpu =3D TICK_DO_TIMER_NONE? Is it really bad? >>=20 >> This can't happen. > > Actually... The boot CPU is nohz_full and nothing prevents it > from stopping its tick once IRQs are enabled and before calling > tick_nohz_idle_enter(). When that happens, tick_nohz_full_update_tick() > doesn't go through can_stop_idle_tick() and therefore doesn't check if it > is the timekeeper. And then it goes through tick_nohz_stop_tick() which > can set tick_do_timer_cpu =3D TICK_DO_TIMER_NONE. OMG...