Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1982282lqb; Mon, 27 May 2024 04:17:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVtTVjpWik6fs+THq7z0KqmaJ1X76riksDzJ+xr6lW47qCuV3e/sJKRfuZB0Cs/F0gNGWg2XuNjt2jFnpXWfFjWOZcgxJZevmWcLx78Uw== X-Google-Smtp-Source: AGHT+IF+OBficJakF7Zv/ySMW3yYuy+XDf2HJzTiAkBVRfbJ4kJC4fOfJsEjpmJ6vaJDwbZ9zpbj X-Received: by 2002:a17:90b:1d8b:b0:2bf:5fe7:7d48 with SMTP id 98e67ed59e1d1-2bf5fe78549mr8784924a91.44.1716808653631; Mon, 27 May 2024 04:17:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716808653; cv=pass; d=google.com; s=arc-20160816; b=W236YL+4nPHJpgF9TjcCe2Waooul4t/zcUfy9g3J36lG1l2tO9CpzjdDK6Dxk1OsHy mdZ9ESxXrZNPIGZSqI4pD05m241jfEWVJ/R2NyXu9VITGMP3njvrc4XoxNKErtpyyjSZ qqvQ1xg9B6Oy3Fmf/U64gRNzFGlB2RTvJQpTG8Hjaj9LOobP7oSP8xKo/LB5yi1mylZo VjMIwUUpschbHWXBxHoLs3VAHkhwac+dq9kpsSH0fvBrWXIH1Ym89RcHTd7Bbhun0HDD yK+4tm3ohbjg/hS7nMqsYS6bHTC/wX6KPbqtsbmTMoffGOMDd9+5bZw/swBAAkbiFQwk QDUA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:references:cc:to:from:subject:message-id:date :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=k0DjMfdVZcJL4TTwkujKDYIw93uQiKEaf6AgX1+f72c=; fh=VcwMpaGlqrM89zrbMC2DlJtaeIjLCBl2AXMIMwHP2p4=; b=nmK+LyNBA8DraftfMl8f2i4E/Nn9T02+ntBozc9mLVOv8/OhQoVxdi8POFeJSETY1X MVCSF8mZjPfOr6KzlB6rJlk7G+IoqAM7z5Y893C80EGvQnDMbnlYi0dG4grQA3ABmhyF aOGQV2HbaJdaiPD8dCVMlj1fmqBlS7DrRYPFe3mMPP/wHviyLr8daQNHtI3MMK5Vuywd BpgYi83dz3CWGy0N3kTRFsW5l6pNMgvN/sWiH0rR+1pnibDPs7aprn1MzJdUuPbsSKWf N0VoQ7kbr4rC9W2h8QTAm5itsPGPEAXyV5VPA9xeq3sO7XlrQYxXdkoHRcYQ9uO4VKf7 PWHw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=GSXEvBna; 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-190469-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190469-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-682278902d6si6117358a12.323.2024.05.27.04.17.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 04:17:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-190469-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=GSXEvBna; 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-190469-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190469-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 86EB2283491 for ; Mon, 27 May 2024 11:17:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CF37F13BC3E; Mon, 27 May 2024 11:17:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GSXEvBna" Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) (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 BAC1C13A259 for ; Mon, 27 May 2024 11:17:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716808626; cv=none; b=HZaNs5AwSaqBJNM2Z2DxKOfMFZkG81PV+xCz4ZSq7Vrzn3SR04lukEI4thWmgPhl7JOVhPSX4nBGBTd5tGzA5ErvluKU1nE+9XOwvtw+IHNG50aRHTXoQrNkl7pcw1/scfyGeTXc7peBd/V9wlR2HOrSiQqunOuzysvs4RMnMnA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716808626; c=relaxed/simple; bh=O6VzHqnKSqWms8Eo83avq6Qp5y89RLEkrexPlfSt96g=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:From:To:Cc: References:In-Reply-To; b=ENJ8rFoKd0LavyLXCP8WTJi2x+LXsWpvVEvueKOKjdkO4C1A/F/prKJVdxT/otdQwsA4hWZC3qK0x726k75kCYi1i7MrFpIXqyJcfHBs8AiVNazJhuzp8h7AKdrZunWu4wduKmKnt+aqwnLLgEh2e9o8uNOOKLdGEWx+TTVYooQ= 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=GSXEvBna; arc=none smtp.client-ip=209.85.215.177 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-pg1-f177.google.com with SMTP id 41be03b00d2f7-6819b3c92bbso2623700a12.2 for ; Mon, 27 May 2024 04:17:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716808624; x=1717413424; darn=vger.kernel.org; h=in-reply-to:references:cc:to:from:subject:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=k0DjMfdVZcJL4TTwkujKDYIw93uQiKEaf6AgX1+f72c=; b=GSXEvBnaMB9SUgZiBWRpSZf+FkBMjjCNL/0Jo3lj0kBXQGby/K1PXsRrDZKJvcB/bZ sAEM/4ZWX2QE77WstaPBmcKbz5YOje02IOJfft4XFcziJj0GEgmZsYYXKG/BVwOeRP/d 4iYZPI7B59nB1i+GKTFZeGVNywf/cyqg52qbdGcU+vqhHUvJVXlG84uw+aBkY9KVmSDd MQwj2z+WOw7A/4lTCVpE3kgEPq0hX4GELZn1Du66YcnVOHot4MJhF1g8TaKePxH1L+uF SOW0DadyvRD9Kk33AKO5I6QzxCbOTodld+wTL4CfWdIhAz7V480AdcNHsxYnvVuBZyHB Wh9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716808624; x=1717413424; h=in-reply-to:references:cc:to:from:subject:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=k0DjMfdVZcJL4TTwkujKDYIw93uQiKEaf6AgX1+f72c=; b=T1EGPxwwfYXibJgmzsMfpYIGcKP30O4JAU0PJ9otdX0W74U76RKm7NjKDR51gyR3dW NVfkkQi7Ix9kUezKKIxcOytQI4SKc3r3I7iAdw4sx3iMS9KZo0RV63v3OCxQgkDkpZcX xkrOcWbGyXxlNIp0EvI/7I0evNqDEkdsqmM8ssbjuQow05tukpo8+rYOAFz2EOX3neP+ rv9guANC8UAhYMeOnIz9LhmvwS9ehjoKVEXSEMM9nirGAm5s8udQZvzUR8z6+L6v4sMS 0Ars9cHqUYeoV3b0E8l1/sibHBJ0Cb/uIXC3wSz8jMcWLAW+4UhToLUas/wxzDnl1BpS JNXg== X-Forwarded-Encrypted: i=1; AJvYcCVTziYLnzFUVFrX9stVL7Gyz2NFdew6WBqPZrgucb+CxX29TEkRn3lEdrsqfVc1IcmDDUiQcbdfyjFZPeHDwOGcMLl3fI1nlJa5rlC0 X-Gm-Message-State: AOJu0YzeFln6z6TAR46Bfng/DxVH2p0knAaN1gkNigExEBJwootYGy0U rsf5uFOuAf58+Su808Wga/3SZpN2ASVZV6B0WObe704xBG/r2+/l X-Received: by 2002:a05:6a21:398a:b0:1b0:27dd:3355 with SMTP id adf61e73a8af0-1b212d04ac0mr13876669637.21.1716808623762; Mon, 27 May 2024 04:17:03 -0700 (PDT) Received: from localhost (110-175-65-7.tpgi.com.au. [110.175.65.7]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f45ad4444csm51065275ad.274.2024.05.27.04.17.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 May 2024 04:17:03 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 27 May 2024 21:16:57 +1000 Message-Id: Subject: Re: sched/isolation: tick_take_do_timer_from_boot() calls smp_call_function_single() with irqs disabled From: "Nicholas Piggin" To: "Thomas Gleixner" , "Oleg Nesterov" , "Frederic Weisbecker" Cc: "Ingo Molnar" , "Peter Zijlstra" , "Phil Auld" , "Chris von Recklinghausen" , X-Mailer: aerc 0.17.0 References: <20240522151742.GA10400@redhat.com> <20240523132358.GA1965@redhat.com> <87h6eneeu7.ffs@tglx> <20240524183700.GA17065@redhat.com> <87v832dfw1.ffs@tglx> <87ed9nd041.ffs@tglx> In-Reply-To: <87ed9nd041.ffs@tglx> On Mon May 27, 2024 at 8:23 PM AEST, Thomas Gleixner wrote: > On Mon, May 27 2024 at 19:10, Nicholas Piggin wrote: > > On Sat May 25, 2024 at 8:06 AM AEST, Thomas Gleixner wrote: > >> along with the removal of the SMP function call voodoo programming gun= k, > >> a lengthy changelog and a bunch of useful comments. > > > > I might not have tested that path on powerpc since it should not > > switch clockevent driver (or clocksource either I think) at least > > on 64-bit. Explains the smp_call_function warning if you are > > testing on x86 :/ > > Even on PowerPC the per CPU clockevent driver is registered during early > boot for the boot CPU and for the APs when they are onlined. Before your > change the boot CPU was unconditionally taking over the do_timer duty > and never gave up on it in the NOHZ full case. > > The logic you added allows that the duty is taken by the first > housekeeping CPU in the case that the boot CPU is marked NOHZ full. > > So yes, that function call _is_ invoked on PowerPC too if the boot CPU > is NOHZ full. There is absolutely nothing x86 specific. Okay, right you are. Indeed it does trigger. > The difference is that PowerPC registers the per CPU clockevent _before_ > setting the CPU online and x86 does it afterwards. > > So the warning does not trigger on PowerPC because: > > WARN_ON_ONCE(cpu_online(this_cpu) && irqs_disabled() && ...); That explains it. Thanks, Nick