Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2143376lqb; Mon, 27 May 2024 09:09:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVKEjK63A3LyOaLoJe32m4ssynw9Lh9tZv+SJ+hSsj00LbpTkyUCn+P/hhAFxHfmXxIn/yaIVNl3lTN1CrRX8sRHkvwZ96h6stHSoE1zg== X-Google-Smtp-Source: AGHT+IEK63ZrN2eqDFSzD9UdHZ8fujc7GU+PtSfywdsJ0GUK1QUwNjkQaeGyvNgaT+nEEbW52Tj5 X-Received: by 2002:a05:620a:4110:b0:78f:c70:c633 with SMTP id af79cd13be357-794ab097eafmr1184779085a.34.1716826184657; Mon, 27 May 2024 09:09:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716826184; cv=pass; d=google.com; s=arc-20160816; b=TPvdIW+k8dKQx+/keTsGNFidDbg4UbNNoUnyHgmSj9/m0hbUPMaWo2GfmhUGHk5GGJ aKcODH5J9T3d698aIQDn1F9Y1ylZkh6jX9O64dnra0fd+SIe9nDir6KdwGX19qh/FEqJ 518bwvMCXMQm79LB5ev9BRkX9hR1dx7Ni6hmDCC72p5dm+ucDT4BTb5kZqplJhG9Is1J EhgAkoO0NB3NBdYvkPeoBnAp312+kwIhrbxulhDy3ONLXgzEuoB17QGNqdN2R680iPG6 BTVXJoIMmExxpOT4A7YI3YsjbAOJFO9CWUhEKWuPJS6ingBii7StHBC/FiZa5jmg5sg6 RvDg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent: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=cwxKfYS2pCvrGUMtybHaN+IODPR5mz8KIAEhCBULf0w=; fh=PxQNGKmQ6hX4cfb8NAoP5Rz5r97APMm58qncf64KkqI=; b=kaqDnDMMLisDsX/NQ9ULaDZlOKcINVRGVmXZMdoZWsosk+M9891UVH7qx177Ov5xJx LjkFIvKirADJ6FzisTaBIDw+cYLZNU5vJBZZTqzxbbf8q4kpE8DlzjBt9lBBDt9WF2DE O+tm5ALFi+AoJb0j2qJBdNCWIAdU4yDZ9s6n8ZNDvEN4BN1PH24dPvEXOyRy7sQj177C vYaBQ5KYkhpm00quErTsicHkS/yJ2bcXf5nWGo01tGTVmAqg088AmgsP1hw5hcdUD24N 5aV6JZzniS+S2Ijn6CrweICvVX76aqseks9BhWi5XKL5pwWRj4YpXNyBpVYnGHKCuEH9 dL3w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fhvEpwpp; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-191179-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191179-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-794abd3b465si868745285a.389.2024.05.27.09.09.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 09:09:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-191179-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=@redhat.com header.s=mimecast20190719 header.b=fhvEpwpp; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-191179-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191179-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.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 6603E1C20A5E for ; Mon, 27 May 2024 16:09:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D3AA2167D92; Mon, 27 May 2024 15:58:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="fhvEpwpp" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 A40AF16728E for ; Mon, 27 May 2024 15:58:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716825527; cv=none; b=jIZn+h9mGAM7A1kwnbDqce5xqzLDGAqPp3y0oIc9j4HjUWxTC/lzV0k9DP1oEql8pJGlTCnV+M4vrNjuVM7r15353NPHZaxGXCS5leI+hYmmxr6o7wyz71d5LtqqkW9NhdHC/xEZBHSKTRqWWXh28YxzdlAeLcGi7J77pGVVDpc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716825527; c=relaxed/simple; bh=4EUBGrUVhm/r5cBtJVBlRDWc/A8E3//UXsSF13PgPTQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=XDQ7om3mxK/BOaGUbqhuDx4eGkM/xzAGGwwsLagS5aSJE2WYdzu9kZOvnrl81abu42CoGZ4+NebNvxTalczyxmx9S+XNonVHzW+fcnrWQM8pV78E6HJimf/Eac67a8qL9BPZkwIrJjFnFlD/XPOCVCTrQjWqvT/CXYHgvhBvDUA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=fhvEpwpp; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1716825524; 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=cwxKfYS2pCvrGUMtybHaN+IODPR5mz8KIAEhCBULf0w=; b=fhvEpwppXo7mBswY4LSR3vRtk6tA1isvUjnhGkwMT1SZyJvFUt743tZNT9YHOPSE2ZaJOI 0wlmDm8CEuwNs6rcdrWkt/OmYCCVCQYvYsWH4YHo58i8/Y04av7KVlu9WDjnnJAsSi08GN oLCOKrcOL+tNfCwL5sqMCIsgUP5CFiU= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-371-tH75msrNPIqR0b_GMtyP3A-1; Mon, 27 May 2024 11:58:41 -0400 X-MC-Unique: tH75msrNPIqR0b_GMtyP3A-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3A538800169; Mon, 27 May 2024 15:58:40 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.45.224.41]) by smtp.corp.redhat.com (Postfix) with SMTP id 2C4AD2026D68; Mon, 27 May 2024 15:58:37 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Mon, 27 May 2024 17:57:12 +0200 (CEST) Date: Mon, 27 May 2024 17:57:09 +0200 From: Oleg Nesterov To: Frederic Weisbecker 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: <20240527155709.GA5733@redhat.com> 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: User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 On 05/26, Frederic Weisbecker wrote: > > 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. Ah, TS_FLAG_NOHZ! Indeed, thanks. > > 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... can_stop_idle_tick() has no effect if ->timer_expires_base || tick_nohz_next_event() but I see another email from Nicholas. Thanks! Oleg.