Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1973860lqb; Mon, 27 May 2024 04:02:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX3Ivu32KAgTa0VwKeE+sUvZT8jWJn0Vcme1EMFeDN3o21ZvHuFwizu6WB5zdrsDPcUrOnAoTrz7uWTYWnZMUxhf3kn9kh84KwwmxBB8w== X-Google-Smtp-Source: AGHT+IECgIsoFY6LmbeBVBZCORi/wIhlRAlKppfYooMU7DMcsoS2cVLhE4gaG+CxTf3lxKeyjALv X-Received: by 2002:a17:90b:3709:b0:2bd:eb83:47ed with SMTP id 98e67ed59e1d1-2bf5f51aee5mr9688695a91.36.1716807726392; Mon, 27 May 2024 04:02:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716807726; cv=pass; d=google.com; s=arc-20160816; b=Sv8dKjHzBQKdwCbVDJslzWEuXtBNrATTwNGKEwdTklekj7/o1YTZJjJzNPe9Gn0WVY Bg0EmV90kV/YvVxyEiR7CSyw71Ifqsv7u/KAo2YDYRh3M2KOvsSxec+Ou0CsZF4V7zAZ 8L02BagK7+BHrdlTloZskdD4nvjVhdMD6XplsgH30nJGOttUV3RE5ErxeChBQS9uJi/u /zvpDE32qj/dZoweuVqCYlT28wuMxzO6+fuq1vcOXjxeYjg6MwhRbBdNSE105TDTvPwe QsSGS0aTaNYYDf5iza3OYMbJKRYvTdtqz/gE9SdXwYS7aLiyRt1Q8EjZlkabVBAktSLW GDLA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:references:subject:cc:to:from:message-id:date :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=N3WWrTHVACXpCI2fdQV5uCOcWX1YRuGVU7Obj/fZBnA=; fh=8y6h4nXVr+fYREmEApmY/ywIO5Y8gO+txhU+g0K3GPc=; b=DMyn9RNTjYJaRX9WnTKwSCyHEMb9T9Xmo+1WpSGmogXyDCvoyhHdCXy5hnx6ecmHET kli9485re1gW6nZ6fSEnXHMEoTkSkxDeBzEQlYp+QyhjNw86g/Q1a7SfkpwPy+m4XUu4 M9W5gbLTtfuPwJBcZl7mLFisMsbFt/03kOwjn4IPVKRdbGodWYCDFhbZNvNd9qT04BPE XC+dbNaUiaXEy08IJhq1yu8G38DzIo/cLv0jJ9f97KGwfoicFKy/qg5z4AmuOghIIoPT SKvKMB4ONSJYUGL3VnMQQ4DUIycqMM+MRCtOe7pcP13QLXMkHF3bNHuC5jnkVQ7xA7Iy 1rpQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="lbh1YcF/"; 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-190458-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190458-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. [139.178.88.99]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2bfa1aa0380si3254556a91.167.2024.05.27.04.02.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 04:02:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-190458-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=@gmail.com header.s=20230601 header.b="lbh1YcF/"; 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-190458-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190458-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 E03A228146F for ; Mon, 27 May 2024 11:02:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5EA5613BACD; Mon, 27 May 2024 11:02:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lbh1YcF/" Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (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 58E2A17BCC for ; Mon, 27 May 2024 11:01:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716807719; cv=none; b=myImYScUlMUpZpElXslNty/XijTn7SaXok4GSGHG0ge5aZZ5xanU9MLhJgIk5bvlJwVg+EOCEXqciv0V1XxRsvUe6R+p4wQ42nv44C3/3EGhzTPbBr2OBd9GUFPUmNctWRJCCAdO1JGreB3cH3/vxTlWa7GClclHtZXkSoEGpwI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716807719; c=relaxed/simple; bh=AsrVCLUcFSzbtPI1hEaxIe6byGDs3hp07mY6F7v3C7Q=; h=Mime-Version:Content-Type:Date:Message-Id:From:To:Cc:Subject: References:In-Reply-To; b=Ugce8zNKY24/epsHXk0b8OYhBDYKTTA5A18tDLms6Q4YawxDHxha0+OrupZrnzjPGYZLwB/IccmI3wyKkzV42+Om5Qxpr02lichDFNCZ5aiqLykvlsSPzLM6j3G2D4C55CEUFZubtd+Cgae7OcoZOSLYndUA69GMlZPsvxMvov0= 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=lbh1YcF/; arc=none smtp.client-ip=209.85.214.180 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-pl1-f180.google.com with SMTP id d9443c01a7336-1f32b1b5429so32731475ad.2 for ; Mon, 27 May 2024 04:01:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716807717; x=1717412517; darn=vger.kernel.org; h=in-reply-to:references:subject:cc:to:from:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=N3WWrTHVACXpCI2fdQV5uCOcWX1YRuGVU7Obj/fZBnA=; b=lbh1YcF/OT0uMCOgZyTmA3rWNFzwSZOoVmeU1f09RS2SPqctD0VG9/tvoc+QM5bKtv 6mfZ9oOFaNkoa3DyAzvfpgQqEv6kf+/aSDyiOfe3//8DokqSj8ZRRqzCODI/WPBF3gI4 PvnA6+qH9ihxvBQni6tK7lTHTlghe8pcMJ1HGPSaBhPeB60U4sybAEJn99b2l2WOhgEy wfpPj3gspP1FPeHw1gG755fVaMhly+SvDXP5Uk8SpKJ8FUzScajwmI5Z6DIVkm4aE1Sx sD2BbxN/0CDEMmesyBX22woyq0Fp4F6pkczp3nKgcDMqGgCQGZrkUtVPJ4LRHIiqayrr pthQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716807717; x=1717412517; h=in-reply-to:references:subject:cc:to:from:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=N3WWrTHVACXpCI2fdQV5uCOcWX1YRuGVU7Obj/fZBnA=; b=oV3YtyLHlLekxa8C0LzKbk9gR4PWiQnPSe+//cgINSX0SACTDOVPVhpZx4eq4ZJaju DEjNYyYA4JmGxaKpt8BtFkTUKWl7L8MHqgAclYmOfLMw5kvkl83JgJh6QFExpK6uzsBD ziTGvnXfkWer4ASOY5htyd77fC8IKlKzzvysqkoihHdla+f+egNUSnSm5gMvxKGDR/NH jOfs1E9vpcRmOUR71Zu8Md866W6xuiX2foOcS1oX1dnbPYfuo//LP8wFgY2FCmz6YSy7 lbsXZJddy+7BDGtT6P3kOtMkSPnPtFwjWtnpqDDoKOrGTnwzSdpZ/RaUD99qORDIr16B R/zA== X-Forwarded-Encrypted: i=1; AJvYcCVClRnCmoI0JyYTVNqVAIdvGi0hc8q671xqXhgDD79c6yiK0qYqR+mIJ89txY45NqVgME5Xn+bdb+LN3y1zCPxhPgzkpboNvdR4m+k8 X-Gm-Message-State: AOJu0Yy966hNPtFgWYeRPkLD+WwY7sA5ait9+dwHINdHEuNubZZ+lJkU hG2k+sEw8I2RtHEeQVeY8YrgXQqi5IaVm08AcrA7sdGVRvQMpfJ7 X-Received: by 2002:a17:902:db07:b0:1f4:8ad1:3672 with SMTP id d9443c01a7336-1f48ad13b52mr37204615ad.22.1716807717418; Mon, 27 May 2024 04:01:57 -0700 (PDT) Received: from localhost (110-175-65-7.tpgi.com.au. [110.175.65.7]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f44c967acbsm58346825ad.149.2024.05.27.04.01.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 May 2024 04:01:57 -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:01:51 +1000 Message-Id: From: "Nicholas Piggin" To: "Oleg Nesterov" , "Thomas Gleixner" Cc: "Frederic Weisbecker" , "Ingo Molnar" , "Peter Zijlstra" , "Phil Auld" , "Chris von Recklinghausen" , Subject: Re: sched/isolation: tick_take_do_timer_from_boot() calls smp_call_function_single() with irqs disabled 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> <20240526192758.GA21193@redhat.com> In-Reply-To: <20240526192758.GA21193@redhat.com> On Mon May 27, 2024 at 5:27 AM AEST, Oleg Nesterov wrote: > The more I grep the more I confused. > > On 05/25, Thomas Gleixner wrote: > > > > Right. It does not happen because the kernel starts with jiffies as > > clocksource except on S390. The jiffies clocksource is not qualified to > > switch over to NOHZ mode for obvious reasons. > > Not obvious for those who never looked at this code ;) > > OK, clocksource_jiffies doesn't have CLOCK_SOURCE_VALID_FOR_HRES, jiffies clocksource requires a timer to run it I suppose. [snip] > > 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. > > And I still don't understand why we can rely on can_stop_idle_tick() even > in tick_nohz_idle_stop_tick(). AFAIKS timer_expires_base would be 0 unless tick_nohz_next_event() were called, but that is only called from places that checked can_stop_idle_tick() or is already a tick_nohz_full() CPU. And timer tick CPU can't be unplugged with nohz full. Thanks, Nick