Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1133668lqb; Sat, 25 May 2024 07:14:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVkq7htWLwywjwnJGvS07XiPaLZxXCeJsJxoLiOWDV1UJq7y9M3yJQeNR9CwK9SXtD91dpvAkwgDT4IUokLFF8SPxUPubT7HC9bsMzGIw== X-Google-Smtp-Source: AGHT+IGkQ2Z1QWZBbFG0jGdqW5gZ4gt9h9Ah4rMrctQEL+KPdB5sYKp3CFhSwSDyX1Vw2h2UXmNf X-Received: by 2002:a17:902:db06:b0:1f3:33b9:5ec9 with SMTP id d9443c01a7336-1f44873419bmr58855395ad.36.1716646499509; Sat, 25 May 2024 07:14:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716646499; cv=pass; d=google.com; s=arc-20160816; b=AmlObbnEU9YJstk+nuFmJbZ0ykhtX2kBN9Xun4cru7G2/8yIMUinWBQHbdRCUBJ80e 2bpxRAs2XcpgXYgtAwqdtEj4FIyklO1VnrhBE3W0SCXgYJ6blgBLue3VSpbtE90MFU9Q XS3KohNaIqHPo+tAnmojxD6uoOEh8Wi5arjdr+y5BkpmCj/5QLakq2njpVHPDSaZGG8a d1jimCHNxPVtBEgq9zp+b64zRpJQAmijiuwnVKaJRNm2DltvqOH6jIWvvs21MeGPLQxc tsObzmBYAajPswDdwt10fuksnQpDmN6VrFLAv/zb2vTYk6+auU+4fZqV7W+M8/glYzq0 WVDA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=7wCH45uTfDya+DL9QJ1iuo8YA4XOLtIW4iKHM6qViqw=; fh=gw+MG/ucCDUT4Jsk4gE/Ka2iEMb3zdx85uzpkpjLAXs=; b=gfM9S+r7xL2krBsaYb3/mpUiGWlJ/zs+FOP5/Z1gsrsemfNv2v6h0OgvDOQxOdq5ow wHymjAxoP48Osw5xEEr3NoZvHH9BItNQzI1wcSr1KCGlyblOGpG8Rvv73aKkWVu2nqfO AJ+/mV5OyDQsrmZabbiXLQ0w2JLh+VpjTiztSwYhJs8KyxVReHzYbKNH64Cgivj7aPIW qZCRaL4N5bED4VMro2Gt+slCaJV9Bqqr3XQx8cIG6p8e9eyLnKOKAnb/FymluzfOOTEX 7h0y1q4y4Ebjvgu54tZAZx9813qLosB5d2z5JFT0Af1/N009HWHXATAHGd4ZIY26KDi6 kdNA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="TYtOO/qu"; 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-189377-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189377-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.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 d9443c01a7336-1f44c9ae089si30197055ad.422.2024.05.25.07.14.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 May 2024 07:14:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-189377-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=@redhat.com header.s=mimecast20190719 header.b="TYtOO/qu"; 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-189377-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189377-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 26A0B281945 for ; Sat, 25 May 2024 14:14:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 576194EB45; Sat, 25 May 2024 14:14:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="TYtOO/qu" 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 0CF5D4D9FA for ; Sat, 25 May 2024 14:14:51 +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=1716646493; cv=none; b=fczTvKL6OOYWNtqjpqKc/mH9WxyyWoZU2fHgapnpnuFQWLQqZIxeOQWuHovwY51WfS53RSDwody4IexS8AFBPXUx0XiSCrx2jgmfnJeFy67xWyWxksjva1Z6cyN9h/FRKs11cp6PeZ7SxPAnQ+9Um/wFJxEu24824ENg794MY2o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716646493; c=relaxed/simple; bh=pHhYDQhaaY66FKKr3DmflctteLE9gs3b4zQGDKxGHvk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ibRIHs0nwP+jpINVYhR5eim24jBeZxkxuRBbpTa2RqNBCWWb0v3Dc5C0AnedOwoCZBnuIN/TzeEoKJC5zCwhjc3YFX6IIAOol9NEQG4x5gca7SCsFrPGU0mrS+2F89+eCTVyZDmGMF8PrF00el7oGzdIRGqo2VwkZBlF7uNohDU= 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=TYtOO/qu; 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=1716646490; 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: in-reply-to:in-reply-to:references:references; bh=7wCH45uTfDya+DL9QJ1iuo8YA4XOLtIW4iKHM6qViqw=; b=TYtOO/qu3mSNonrNzSKWCw0a/vf0ydKKgGwXYg/MNCuDwyJE07jpMvEeAXhOP8/KNTcGmJ uL3u/u6ZCYrS/szSS2Y9cid5rUogaeHEnZlkqlAo+oYXjynsBY23CA2FVQWZCXpiwptC0h bdjv5UTH6Dq72RaWfeXeP1i6+Ya8rGU= 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-217-3C3P-pt0M--ixJLzZ6rRoQ-1; Sat, 25 May 2024 10:14:47 -0400 X-MC-Unique: 3C3P-pt0M--ixJLzZ6rRoQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (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 9414885A58C; Sat, 25 May 2024 14:14:46 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.45.224.8]) by smtp.corp.redhat.com (Postfix) with SMTP id 81489200A35C; Sat, 25 May 2024 14:14:44 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Sat, 25 May 2024 16:13:19 +0200 (CEST) Date: Sat, 25 May 2024 16:13:16 +0200 From: Oleg Nesterov To: Thomas Gleixner Cc: Frederic Weisbecker , 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: <20240525141316.GB24152@redhat.com> References: <20240522151742.GA10400@redhat.com> <20240523132358.GA1965@redhat.com> <87h6eneeu7.ffs@tglx> <20240524183700.GA17065@redhat.com> <87v832dfw1.ffs@tglx> <20240525135120.GA24152@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=us-ascii Content-Disposition: inline In-Reply-To: <20240525135120.GA24152@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 On 05/25, Oleg Nesterov wrote: > > perhaps we can simply kill it along with #ifdef CONFIG_NO_HZ_FULL ? > > if (!td->evtdev) { > tick_cpu = READ_ONCE(tick_do_timer_cpu); > /* > * If no cpu took the do_timer update, assign it to > * this cpu: > */ > if (tick_cpu == TICK_DO_TIMER_BOOT) { > WRITE_ONCE(tick_do_timer_cpu, cpu); > tick_next_period = ktime_get(); > /* > * The boot CPU may be nohz_full, in which case the > * first housekeeping secondary will take do_timer > * from us. > */ > } else if (tick_nohz_full_cpu(tick_cpu) && > !tick_nohz_full_cpu(cpu)) { > WRITE_ONCE(tick_do_timer_cpu, cpu); > } although tick_nohz_full_cpu(tick_cpu) above depends on the fact that tick_cpu = TICK_DO_TIMER_NONE should not be possible if tick_nohz_full_enabled(), not good. Oleg.