Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp21929471ybl; Mon, 6 Jan 2020 14:19:48 -0800 (PST) X-Google-Smtp-Source: APXvYqw62SVkzbLMfVac7e4dFlmupyqatItWezViTO8VTb7qR+SFQMWWk8N47oXNoeu07Vo8wS+M X-Received: by 2002:a05:6830:1353:: with SMTP id r19mr120025115otq.288.1578349188516; Mon, 06 Jan 2020 14:19:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578349188; cv=none; d=google.com; s=arc-20160816; b=AQEMdFjBW73edTQu51qerbbKZwl97zQwTNY13gyWjICbzvSY+7AQQHwy5dVL6hRI6r f8kV7PKDuwmsmpAGZB2BqprW2lb4Y9X+IbOwkb2co0vxOJ31t+lV+mIJyz8Vhb1fSCex dmt3oN3s4D5/ogeqbqE91YoNatppvjTvcF7kN5mGCek991sv+DfXZzLAc5SA4FrQbVCA Ds4vEVIhnD/Q8jOjYFsIqo/1c4aTuW6C4VZLEN/X/QLdKt3BQ5Ev49qXEoGkDR1oRNSB GUgTODJ0pVKuvKNzWMw4Omyc8aVCJcJDl2S+/sNWRBLV5mP4q5BmHiMmEK5rTiu3dBxQ OLGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=gggnkTYtibCNBuaBQhDiomjSU9XvOBIk6ygtPGg8w4o=; b=spN9H9SEPQYU/JTFhd6DrfjgXWuRlBNqTarqWlWN93U7m3XaVyKTSuH6loKwDsjpnh VOXHW1IkkmEQqZfh3hvf0QbghIs01zhrRu1hxyVeLDc7iXOjd8xUBNAzjLUQHDiSQym4 T35O+X1OK7GIIYfo5G4wbltuX4CMOPKEAVWHlcqMKUWPdnQcbmvnPrcoFOSXbmmqoG93 qX463jfE7qfOGEJAZQb3A6C3Lgpd/2xhU73iBoQ113yFp+5oUtQNnNmhip6JR5rFVX/B 0x4Z8u0+avTo5v43h6XIUwA53uvSPLJXzfAk3qApOVn8TGQddJT5Ismq1fT8t60VlGl3 1LoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qPC5q+Zm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id 101si35029116otm.168.2020.01.06.14.19.36; Mon, 06 Jan 2020 14:19:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qPC5q+Zm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727219AbgAFWSy (ORCPT + 99 others); Mon, 6 Jan 2020 17:18:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:48714 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726695AbgAFWSy (ORCPT ); Mon, 6 Jan 2020 17:18:54 -0500 Received: from localhost (lfbn-ncy-1-150-155.w83-194.abo.wanadoo.fr [83.194.232.155]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2A5D82081E; Mon, 6 Jan 2020 22:18:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578349133; bh=aOq88Kdv/xqqvmSHyVyBDCV/K9Sa1oXzVNvd1u+Buts=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qPC5q+ZmrxSZU7qareABNle0xnS3ptrD66RNLoj3Y+CyK38TidyrkZmk6zUbKCbeN TzkDjYPZMoYpxfwufXgiuwHsb/gKHZXmxHnRcePvWdnIQUqlVJjr/r5q7AiTQGJiY4 rHwMv4i3cJZaE2rgRhvEv51rhnDtyIjMdad1w20E= Date: Mon, 6 Jan 2020 23:18:51 +0100 From: Frederic Weisbecker To: Scott Wood Cc: Peter Zijlstra , Frederic Weisbecker , Thomas Gleixner , Ingo Molnar , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/4] tick/sched: Forward timer even in nohz mode Message-ID: <20200106221850.GD26097@lenoir> References: <1576538545-13274-1-git-send-email-swood@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1576538545-13274-1-git-send-email-swood@redhat.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 16, 2019 at 06:22:22PM -0500, Scott Wood wrote: > Currently when exiting nohz, the expiry will be forwarded as if we > had just run the timer. If we re-enter nohz before this new expiry, > and exit after, this forwarding will happen again. If this load pattern > recurs the tick can be indefinitely postponed. I must be missing something but I don't see why that would be a problem. Indeed the tick can be indefinitely postponed but that's as long as it's not needed. As soon as it's needed (timer callback expired, RCU, ...), the tick will be retained and it will eventually fire. > @@ -642,9 +642,6 @@ static void tick_nohz_restart(struct tick_sched *ts, ktime_t now) > hrtimer_cancel(&ts->sched_timer); > hrtimer_set_expires(&ts->sched_timer, ts->last_tick); > > - /* Forward the time to expire in the future */ > - hrtimer_forward(&ts->sched_timer, now, tick_period); > - By doing that, you may program a past tick and thus add a useless interrupt at each idle exit. Thanks.