Message ID | 20221104145737.71236-13-anna-maria@linutronix.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp456132wru; Fri, 4 Nov 2022 08:02:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM50LV0qulQZxvtqj8qiDZrHafaREV62Y9Pghl4/5+shM2X2x/T7mlXYy6cDdlOxFL5rh4k+ X-Received: by 2002:a50:fd12:0:b0:463:cb99:5b1 with SMTP id i18-20020a50fd12000000b00463cb9905b1mr18344705eds.256.1667574172405; Fri, 04 Nov 2022 08:02:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667574172; cv=none; d=google.com; s=arc-20160816; b=EGpwWNEwiLe+e76suYwlnY8GcG04jYXq+br5yWgKcJjv1MPxP99FNiZCS7f31lSLtH W8942sHK8b8dcQOZzHImvgrjqQhIMTf35q8OK3652gJMbYMhtznJ9LA+Y24IYUhxzV1T fr1mQMRQcRB+4IA2axPdgagHuncGprxr+VV90Yoo1c4dPTNWpTRhXznUyv498rKgp0Mi D0uxrQJ3XAlVc8VBVuIP7KYvvxUZ0E0ELF1niI53ivMtQ7OWlfoK0Me5C4QTJzLx8RkM kySK3niQOV8iWdnt7nK/hkHGk++491m86Q0gtRPfA4523qS1AseTdJgsV+TGVnjB1RP8 Qf7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:dkim-signature :dkim-signature:from; bh=og4Fmjqc4BhAa6zqoKeZ4IC2HuQC1SBhqBX9c57/ezA=; b=GKnLD2khTXmVmGwFtaLyMF0LwDAWgiYK6xffXFGLL/gC1NM3/Dz8vkoci4Ori4fQ2h vp0L2AsdxJ3JIi07NvmB4yXJf61DunqYJpxSeL8YwuMoaMNN4NH4QHUBn2m4SeBx7Ttm JstD7NDL1iRllHkHkMasKbnXq6wHWBBgWtV+YovS2ileZeRVwkZ3pNiJpNSKHPspQ3o/ ohKaK0sWdScezQTVmSkGoPZKxHzjRYAWEh73wkWV7xpt1+ytB+DKlAfbUfZSC4fm0pjs zl48gDvLFtX7XjpWkHk1a+kr/z/VykhYyWxlrbCZp8LgFV6ZKfXwWqSol/OIbp0MOODX 1M1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="BG0dJQS/"; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dm5-20020a170907948500b007826de24087si5763076ejc.228.2022.11.04.08.02.27; Fri, 04 Nov 2022 08:02:52 -0700 (PDT) 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="BG0dJQS/"; 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 S232355AbiKDO6z (ORCPT <rfc822;jimliu8233@gmail.com> + 99 others); Fri, 4 Nov 2022 10:58:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232278AbiKDO6G (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 4 Nov 2022 10:58:06 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54E4E31DCE for <linux-kernel@vger.kernel.org>; Fri, 4 Nov 2022 07:58:00 -0700 (PDT) From: Anna-Maria Behnsen <anna-maria@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1667573879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=og4Fmjqc4BhAa6zqoKeZ4IC2HuQC1SBhqBX9c57/ezA=; b=BG0dJQS/41uoSVCg4fsUBsZRj3FHe0a2pi920fPBprxNiIUtEzblTBMLbF1Y7v+G0+usMQ XF6HUNpzMCq32JKBMQn/f+i8Bqt5svsuKxSMp0wYHnryE3voSKYtuwCLK3BkQvhktjUMpH f4mtmQfjKU0PYYCSGXv/qYT9kbv3DzUCMgIIusxV/CxaXTV1lk2Sa9aMqOmRyVIUgsz+nk yJ6RKQKzyxfZpU3/Wdsfhh7VKTN5c32YVRfYkQ5a6o87lvc6iioImPEwXGKNdqTJEks0kf O0WoX4NUkeuiiJfES3D9HjP64NFDFwdLK2wkfyd0w01M9+YwiPGy1cDVweZ4ZA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1667573879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=og4Fmjqc4BhAa6zqoKeZ4IC2HuQC1SBhqBX9c57/ezA=; b=sHaIgiqK10fb5yXmKO+wxs2Y4tbS5fk61OmJgtwBTpBRAMibYAZqVws1dyIiungZE9HQuj jMvsK86yboVj15Bw== To: linux-kernel@vger.kernel.org Cc: Peter Zijlstra <peterz@infradead.org>, John Stultz <jstultz@google.com>, Thomas Gleixner <tglx@linutronix.de>, Eric Dumazet <edumazet@google.com>, "Rafael J . Wysocki" <rafael.j.wysocki@intel.com>, Arjan van de Ven <arjan@infradead.org>, "Paul E . McKenney" <paulmck@kernel.org>, Frederic Weisbecker <fweisbec@gmail.com>, Rik van Riel <riel@surriel.com>, Anna-Maria Behnsen <anna-maria@linutronix.de> Subject: [PATCH v4 12/16] timer: Check if timers base is handled already Date: Fri, 4 Nov 2022 15:57:33 +0100 Message-Id: <20221104145737.71236-13-anna-maria@linutronix.de> In-Reply-To: <20221104145737.71236-1-anna-maria@linutronix.de> References: <20221104145737.71236-1-anna-maria@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748578255436144204?= X-GMAIL-MSGID: =?utf-8?q?1748578255436144204?= |
Series |
timer: Move from a push remote at enqueue to a pull at expiry model
|
|
Commit Message
Anna-Maria Behnsen
Nov. 4, 2022, 2:57 p.m. UTC
Due to the conversion of the NOHZ timer placement to a pull at expiry
time model, the per CPU timer bases with non pinned timers are no
longer handled only by the local CPU. In case a remote CPU already
expires the non pinned timers base of the local cpu, nothing more
needs to be done by the local CPU. A check at the begin of the expire
timers routine is required, because timer base lock is dropped before
executing the timer callback function.
This is a preparatory work, but has no functional impact right now.
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
---
kernel/time/timer.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/time/timer.c b/kernel/time/timer.c index 641e7284f0d7..f8b2065df79b 100644 --- a/kernel/time/timer.c +++ b/kernel/time/timer.c @@ -1912,6 +1912,9 @@ static inline void __run_timers(struct timer_base *base) lockdep_assert_held(&base->lock); + if (!!base->running_timer) + return; + while (time_after_eq(jiffies, base->clk) && time_after_eq(jiffies, base->next_expiry)) { levels = collect_expired_timers(base, heads);