Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp203056rwb; Wed, 9 Nov 2022 22:52:25 -0800 (PST) X-Google-Smtp-Source: AMsMyM797Bx/5ADoI3CN35Nz5NRTI3k5Hy9pdADBlMptmsMtceGb7zmDLsC21v6t76bspWM3r0tH X-Received: by 2002:aa7:df9a:0:b0:461:8972:e3b8 with SMTP id b26-20020aa7df9a000000b004618972e3b8mr1689097edy.110.1668063145691; Wed, 09 Nov 2022 22:52:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668063145; cv=none; d=google.com; s=arc-20160816; b=G/6JXVPsmwnk7gJmacnPnp21sRBtv32c6XIddvz3B0eKGEnP7spH666hSxfy09uUqS n3Sy83p7JpK9DZ7Hz7tF4U/RUJmVjG7MinaKUInlrmGhVyDYdVJhGariZ6sHZf+isv+2 RubAHb3CPDNMEOPWt45kSUqRR8sSjm0xQWmQXCcjzUu2/3+db4K1l3TvZGINk2lyejHp 03kYGeApdRtV2P0POJ55V3fPguLz8nbPJMXzqUe25cQr9fcpTP/++kK0OQwdYSK6Gajs dTQXZ5MzvvezwehLsm0R9Wd3xSP1Mk87CaKHWTym8vgxKbaADF8YLaVyp4YrFm4nU42I YoVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:dkim-signature:dkim-signature:date; bh=syhWQQJd55H34VBVZdoUeFW6JS341n8jsFsu+Tlr1qs=; b=iltYZYg7s+OhbYkZTqlXX889vyeprd7rzrOXHJB1QnLvOwaGJ60r18kg4ORnYdUsQK /HW+UnXCPEdrCUDt1RQgrBkBSAAEDPHe55GZoiodYCI+G5fvbMYSoqqfygBRlDPMu2Wm F/mE9+ILJ8yV6ZIjpaoL0jaTgPPBNMIojdzkly3KmlETMJvNmncZmeWz/bACVigRs9JK s1vesa5iRjl76YZRqxXX9Mnwbq2SFXcRz4r4LPBRESBPIeJHrBNC5RGyo2qzlpF0YrLm ed0F9xWnKGsCXGPfbFCQflLIrdbMPLeKTwWu4Z5kro3rDYgQ+FmKHBJptdgCJj//ibF8 cCbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=uLnVhVYL; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h12-20020a05640250cc00b00452dfa2bb27si6779723edb.134.2022.11.09.22.51.50; Wed, 09 Nov 2022 22:52:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=uLnVhVYL; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232470AbiKJGeW (ORCPT + 92 others); Thu, 10 Nov 2022 01:34:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229897AbiKJGeU (ORCPT ); Thu, 10 Nov 2022 01:34:20 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 208CA2B26C for ; Wed, 9 Nov 2022 22:34:20 -0800 (PST) Date: Thu, 10 Nov 2022 07:34:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1668062058; 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=syhWQQJd55H34VBVZdoUeFW6JS341n8jsFsu+Tlr1qs=; b=uLnVhVYLXJnFS2hCBmmaBBZOELGNnN82fsvDSO14SXBUIpsguSGOgjStLCzTMj7rU2BC7f Fng+mq3sfPV+vZpSo78hNxd8URvfMQpsOf9WA2Hi2v+A3FECqeV/O1DzK8PH+lEcSBq6pG WwZ2ZBrosOZ96lzall4SBipL25glzsSMqpUkVgccf9hxYsbIy1Wb20iYoT0apDDhz7DuQN zAVz2yNq0nRzw0vGXkH5gg4y2C4e6kdRR5ZIotOVunIs8d6JV5EDEC7XrAz71yEH3uNFZe sGWbyjyXRZ83nNWNLHA890BQROp/ZwC8txngqwDGAx/4E+ycMLqk6BAE+AjNiQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1668062058; 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=syhWQQJd55H34VBVZdoUeFW6JS341n8jsFsu+Tlr1qs=; b=0EvMXDIcR+mpwBdpD0I7DyjASCcVfMsxBds/WVHLXnlusHd/1v37h1x49HmDEtMrPHaJ6w j8G9V1UWmcGnNBCA== From: Anna-Maria Behnsen To: Frederic Weisbecker cc: linux-kernel@vger.kernel.org, Peter Zijlstra , John Stultz , Thomas Gleixner , Eric Dumazet , "Rafael J . Wysocki" , Arjan van de Ven , "Paul E . McKenney" , Frederic Weisbecker , Rik van Riel Subject: Re: [PATCH v4 14/16] timer: Implement the hierarchical pull model In-Reply-To: <20221109163941.GC298683@lothringen> Message-ID: References: <20221104145737.71236-1-anna-maria@linutronix.de> <20221104145737.71236-15-anna-maria@linutronix.de> <20221109163941.GC298683@lothringen> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 9 Nov 2022, Frederic Weisbecker wrote: > On Fri, Nov 04, 2022 at 03:57:35PM +0100, Anna-Maria Behnsen wrote: > > diff --git a/kernel/time/timer.c b/kernel/time/timer.c > > index f8b2065df79b..214397d84747 100644 > > --- a/kernel/time/timer.c > > +++ b/kernel/time/timer.c > > @@ -53,6 +53,7 @@ > > #include > > > > #include "tick-internal.h" > > +#include "timer_migration.h" > > > > #define CREATE_TRACE_POINTS > > #include > > @@ -592,10 +593,13 @@ trigger_dyntick_cpu(struct timer_base *base, struct timer_list *timer) > > > > /* > > * We might have to IPI the remote CPU if the base is idle and the > > - * timer is not deferrable. If the other CPU is on the way to idle > > - * then it can't set base->is_idle as we hold the base lock: > > + * timer is pinned. If it is a non pinned timer, it is only queued > > + * on the remote CPU, when timer was running during queueing. Then > > + * everything is handled by remote CPU anyway. > > + * on the way to idle then it can't set base->is_idle as we hold > > + * the base lock: > > */ > > - if (base->is_idle) > > + if (base->is_idle && timer->flags & TIMER_PINNED) > > wake_up_nohz_cpu(base->cpu); > > I'm probably missing something but, shouldn't there be a call to > tmigr_new_timer() on the target to handle the new non-pinned timer? > We need to keep the original way right now. This TIMER_PINNED condition is valid only when enqueue on local CPU is in place.