Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp191762ybt; Tue, 30 Jun 2020 18:11:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWM6IjAR9GznHfViZkbLA0QMSwzvNpZEcnPWqrRf93RbBysXnWaCJYROzmDJNB/YFE3zUU X-Received: by 2002:a50:e3c9:: with SMTP id c9mr27117595edm.90.1593565871292; Tue, 30 Jun 2020 18:11:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593565871; cv=none; d=google.com; s=arc-20160816; b=uWI+6OjQtbVoUjaCVNdiGQCIgTpvmFgbTb1j6t3EuWeW/WPPA1uQLnfC4G8lKX7F/Z eJpjnMFJ9Zkt3AFiaulV7YHAE9jT5FpGFIxYg8wgTy/hKPmjY8YydE8lzD7/QOHPpX36 QNjbVJCW/UPuOG1fOLK2Rf2lWANYeiUBRNVnX+S+/VHF4PBswzik2cUa/ZU+xr13kxTn PhVUIwCIyh4JaCXlF951WpV6AYKGjp21TdcnYPSQbudM5WJR+P++AUEORGNoWjHgBZry Uy3UcAY/r7lK4fOJ0hN38WeVPN9xtSy0iyoWI84IrgJunaOakCENml/OHMIdJ3J96fg1 F97w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=BQCy1xml8VGOHiEXPWFpDzkyPcsb0EXcE/oP3wDXexc=; b=vqrMWeNDMUUm6GjqqdOW/q0LG6gqgGcalVYOoW9FEM+8WYBL55g/9R7ovT+1XGJBOg aMpMteX4J5oRKk9K66h1pUhJM9W1akGpfnY2jagmntSMz8jiPKMsYN8v5H8z+jdAGqKZ gVPqmjIl03TcDdp2IWWqIFXffRfzuCpfkW2LG6PQyPkPbVEkJx0mRkcMhL+HfwmDFgxR QqpuwqykgbCnHR3JPkliVg7NWjb/OWMg+2MjDwyyZhp3u7zcjNEIX9OIVrgAQgqWEV1w EJ7iPk9bRB7FCe/z6Gpz5GBnZVHfG13l+V/ZlQGYrEkrZsjhNtwyHN/xPWyd0y+nfK7v r79Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QixgyfsC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n2si2854483edt.572.2020.06.30.18.10.45; Tue, 30 Jun 2020 18:11:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QixgyfsC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726028AbgGABKg (ORCPT + 99 others); Tue, 30 Jun 2020 21:10:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:56822 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725988AbgGABKg (ORCPT ); Tue, 30 Jun 2020 21:10:36 -0400 Received: from lenoir.home (lfbn-ncy-1-996-218.w90-101.abo.wanadoo.fr [90.101.73.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E69D22065D; Wed, 1 Jul 2020 01:10:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593565836; bh=cKbr0JVUbGa1rdBzJUE+pp3lp4Xeb9PtaK1zjeoyBPo=; h=From:To:Cc:Subject:Date:From; b=QixgyfsCQp5NEXZo6Kxh8J8/IC44YAiWpcvOVv2yQAcBdFGD20KJNGKDQx9iL2lM9 AwoCPThXhIPNt+0ny6HOA87tPVOJGTX8wIv+cUaKU5D0NdnY1vAf6S8UE8A2feYodA TyqV1WygF0f6AFRESpfPJjcJC0Y9tFegyIdd8AsI= From: Frederic Weisbecker To: Thomas Gleixner Cc: LKML , Frederic Weisbecker , Anna-Maria Gleixner , Peter Zijlstra , Juri Lelli Subject: [RFC PATCH 00/10] timer: Reduce timers softirq (and other optimizations) Date: Wed, 1 Jul 2020 03:10:20 +0200 Message-Id: <20200701011030.14324-1-frederic@kernel.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Juri Lelli has reported that threaded IRQs don't go along well with full dynticks. The tick never manages to stop due to the following endless loop: * Timer tick raises timer softirq * Ksoftirqd wakes up, restarts the tick (2 tasks in the runqueue) * Timer tick raises timer softirq * Ksoftirqd wakes up, etc... The main issue here is that the tick fires the timer tick unconditionally, whether timers have expired or not. This set is a proposal to lower that. The 1st patch is actually a bugfix for a theoretical issue that I haven't observed in practice. But who knows? Patch 2 is a consolidation. Patch 3 and 4 are optimizations. The rest is about timer softirqs. git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git timers/softirq HEAD: d0567dd5546d1f32eca3772a431488f8b0ac26a1 Thanks, Frederic --- Frederic Weisbecker (10): timer: Prevent base->clk from moving backward timer: Move trigger_dyntick_cpu() to enqueue_timer() timer: Simplify LVL_START() and calc_index() timer: Optimize _next_timer_interrupt() level iteration timers: Always keep track of next expiry timer: Reuse next expiry cache after nohz exit timer: Expand clk forward logic beyond nohz timer: Spare timer softirq until next expiry timer: Remove must_forward_clk timer: Lower base clock forwarding threshold kernel/time/timer.c | 179 +++++++++++++++++++--------------------------------- 1 file changed, 64 insertions(+), 115 deletions(-)