Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3751088rwb; Tue, 8 Nov 2022 08:02:33 -0800 (PST) X-Google-Smtp-Source: AMsMyM62XIO8a1Qo3V/HlAemscG/0vPdlAyiWRxM6qhShNVSYlZV79PCAmg2IZ/exl1637QqdHH4 X-Received: by 2002:a05:6a00:248c:b0:56d:b13b:e672 with SMTP id c12-20020a056a00248c00b0056db13be672mr41728762pfv.47.1667923353331; Tue, 08 Nov 2022 08:02:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667923353; cv=none; d=google.com; s=arc-20160816; b=Rn3gkye++8iGNmc8LEGauPvC6lovyLFlE3oHjWxBZPHJP4Mx6IXKUq2/VvLcFBXN/2 4b2MLk94ksXKEAPvvoNhUHay6snGAb/3sajrAzOxTgK44DEwjTtVgjPqnW6rMXJ1QSE3 RKI8o5Aiot3NsDtEASlhT1tZnohdLHN1Bm/tyUl6N+Ai7wOMKC5oqIQzsYwcKQKwZxLC RB+/boTB+IpdBqho6ylW1pnY4bhUwJM5WQKdIiG2GKh/RzJ0sSMJhoXHaYg6i0C+Wfck +ofK8lCbcIrmhXpgFnp+w150uMwAhW7D4dk/BevW4xRnlWYQ/j2eYQstQmRZirlFMHFn T89A== 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=4MVyWw7ozXcrMblhUHcrr7SNs20kmx0c9ac3Fc4GHxA=; b=mtUBeOqA1h8svQpzJurepfQh8Educ95D65kC9XnU83AKMvfL2/Wa17tLa5f2+qo5yO dE5qv+xN5tpIph7GKfSsEAebWtC6ICHChhL5cordyfnxCM859Bdd4Pdtf3CJRfbfpU+y l9VKNqfj9ZGTsTH5AFtAG0M5bv7bSPlJI/+iNXBExn1SBPWuCEMCjS9iMFYhurBBlTzW cJ+fMe6TbPyZxw9pC7jbjRtxZj6tnU2MqL7jq3VR2KL9IpdgsH9IWz+9irn0382D2thq 3nkqHScTtO1XjXCIsSyzipV9VQjRmqbd9ZzLa1ubPeBA9dRypb4GkcK9wtfRzOFQtXO3 UgWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=3G5uLyxI; 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 cm24-20020a17090afa1800b00213587b200esi13038155pjb.189.2022.11.08.08.02.20; Tue, 08 Nov 2022 08:02:33 -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=3G5uLyxI; 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 S234523AbiKHPaw (ORCPT + 91 others); Tue, 8 Nov 2022 10:30:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234520AbiKHPap (ORCPT ); Tue, 8 Nov 2022 10:30:45 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F50B56557 for ; Tue, 8 Nov 2022 07:30:36 -0800 (PST) Date: Tue, 8 Nov 2022 16:30:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1667921434; 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=4MVyWw7ozXcrMblhUHcrr7SNs20kmx0c9ac3Fc4GHxA=; b=3G5uLyxIhUKvXhygKe/BdevH06bkBHTOAVpSVPeFcVhxsUqxfu9kH4zWKy+J+M6eVspb/p ZrgLFbE28ixXxHkAfYipr4NFucKxv+PxkmMroKWR0i5hwKi+DQBJmOPvKNKiBGr4ghU4Bk DnetRL5ljxtb2zSKcOyVwaS4LYS8BtmZ7hzcuyc7ZB1kOo0EPtlD9h7Tls1jLioCM5Ajre hKyL2EpNW6hNnTXyBrJlHtORn39MQHrA49DqXv+1uiJN0qw5Xfage2aRTFr8ag375vmtIa 6xg4ykT0CauWwbVYin6pvwNH4RVe0EcOiKR1A2p0AjhhMqlYN99IbGsrGLZMYQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1667921434; 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=4MVyWw7ozXcrMblhUHcrr7SNs20kmx0c9ac3Fc4GHxA=; b=euqAlzo52o/6jrfZX8Lp+1bNRbUkZ1W8dwyxUykH/ceBVA7N2iV0R8a2CXOTia5ACyqyxN PwW5yOmZ5m4N7CCQ== 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 09/16] timer: Split out "get next timer interrupt" functionality In-Reply-To: <20221107124205.GC4588@lothringen> Message-ID: References: <20221104145737.71236-1-anna-maria@linutronix.de> <20221104145737.71236-10-anna-maria@linutronix.de> <20221107124205.GC4588@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 Mon, 7 Nov 2022, Frederic Weisbecker wrote: > On Fri, Nov 04, 2022 at 03:57:30PM +0100, Anna-Maria Behnsen wrote: > > forward_and_idle_timer_bases() includes the functionality for getting the > > next timer interrupt. To reuse it, it is splitted into an separate function > > "get_next_timer_interrupt()". > > > > This is preparatory work for the conversion of the NOHZ timer > > placement to a pull at expiry time model. No functional change. > > > > Signed-off-by: Anna-Maria Behnsen > > --- > > v4: Fix typo in comment > > --- > > kernel/time/timer.c | 93 +++++++++++++++++++++++++-------------------- > > 1 file changed, 51 insertions(+), 42 deletions(-) > > > > diff --git a/kernel/time/timer.c b/kernel/time/timer.c > > index 680a0760e30d..853089febf83 100644 > > --- a/kernel/time/timer.c > > +++ b/kernel/time/timer.c > > @@ -1704,6 +1704,46 @@ static unsigned long next_timer_interrupt(struct timer_base *base) > > return base->next_expiry; > > } > > > > +static unsigned long get_next_timer_interrupt(struct timer_base *base_local, > > So perhaps forward_and_idle_timer_interrupt() could stay as > "get_next_timer_interrupt()" and the new get_next_timer_interrupt() above could > become fetch_next_timer_interrupt(). > > Just an idea. Hmm... it's better than mine :) I know, forward_and_idle_timer_bases() is not the best name. Maybe, it is total irrelevant: Since local and global timer information is required, the original get_next_timer_interrupt() does not return directly the next timer interrupt. This was introduced already in patch "timer: Retrieve next expiry of pinned/non-pinned timers seperately". So it's no longer possible to write: next_timer = get_next_timer_interrupt() When having a function "get_something()" I would expect the information is returned directly. Perhaps just a thing that I would expect... the new get_next_timer_interrupt() returns directly the next timer interrupt. Thanks, Anna-Maria