Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp21834238ybl; Mon, 6 Jan 2020 12:13:24 -0800 (PST) X-Google-Smtp-Source: APXvYqxlHeYLtROTkMij1f+iHU061ZGO2IVKXSO6LfQr+/CTItNMySM4orWnx1XkDnapQIIv6C2j X-Received: by 2002:a9d:da2:: with SMTP id 31mr112968970ots.319.1578341604196; Mon, 06 Jan 2020 12:13:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578341604; cv=none; d=google.com; s=arc-20160816; b=HA247Y423X/mr2jCe2p8nx37uoIwMiQdfo7apj9C7nYs/6YWzTP0aBbqBtCfD3hxOW vpWDARW2w5mwZksaafyn1tcms/1XglXvkCZP1YveCdD1woGJ9GgsarnLESaKXnw4n294 NHRYArC0tacmOqHqMXjmU7hYUBSqKSdg1yPF6YMrwGp4UCc0c4Ub9BhmOqnLgkR7DgU0 XL6IC1kTvtb4dVtv5ms/R9cWNvYVa50NSU/nIokOD93b6yZvhsahAEBb1VSzmZ2Y9yEh Z8HOgYGR0f/qQYmxDvndRZT4cfhIy1NoBRUEXWaPtC4x+1shaAmyE07FT0xN7gx29Rrw 16Ig== 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 :user-agent:organization:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=gdEgty3CE7PdK55uX5qyqvzB3E0+BaCykDG5H4EW69Y=; b=DvXqauTwNFuvtfUsVZBtho7Fn+0/vyVJWo47g9KwK74t6HH+UIJfLnZEL/+I7CN2H+ rMegKfqyzQRoCcwvEYFD/l7244r4FZPFBOPCYkZQJON8zzobPM9zYl15dDk2fBlQC4S3 UsWH5B+2JXQwdssZz88j1dR8Y8fuM0IG+SRP2xISSXyg3xJUpktrHMxVCZ9Ng8F2NkO1 ufJCBUMMfDi+bNr3dSlZuJSQJ8dTYyLVRdXCoOYc5W/H6dwhyv8ssIFn/fcr/1ANoXbr Jiu76pjqF1g4HVoGDitoHZV17oG8psoEhpZuOQQ3lD71FsyohZFP8IdRaTycqRhp9GVO hzqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dcZdrnAU; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k7si32444866oib.115.2020.01.06.12.13.11; Mon, 06 Jan 2020 12:13:24 -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=@redhat.com header.s=mimecast20190719 header.b=dcZdrnAU; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726721AbgAFUMZ (ORCPT + 99 others); Mon, 6 Jan 2020 15:12:25 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:31979 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726657AbgAFUMZ (ORCPT ); Mon, 6 Jan 2020 15:12:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578341543; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gdEgty3CE7PdK55uX5qyqvzB3E0+BaCykDG5H4EW69Y=; b=dcZdrnAUwOfUXFLh2EyyIsZ5F3MMAyHJIYVmVKd6IyYyfPVeOakTkj5KFu4eUSNgj2EAQ1 AxAUR3L7tLTLI3cTwQT/ksgVYUQhKUaXX/KPO2lzNmwQxmY8ZPhARymk1KFgLvcWX/Hnf3 34PP3fDU/wP/80Dk9EeaM+7mROB9Oes= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-391-SCAqrdTOOiiypzT3olz16A-1; Mon, 06 Jan 2020 15:12:21 -0500 X-MC-Unique: SCAqrdTOOiiypzT3olz16A-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 584B6107ACC7; Mon, 6 Jan 2020 20:12:20 +0000 (UTC) Received: from ovpn-117-103.phx2.redhat.com (ovpn-117-103.phx2.redhat.com [10.3.117.103]) by smtp.corp.redhat.com (Postfix) with ESMTP id C76E67DB55; Mon, 6 Jan 2020 20:12:19 +0000 (UTC) Message-ID: <8f0763efd927f791b1c13ca65712a2380985297a.camel@redhat.com> Subject: Re: [PATCH 1/4] tick/sched: Forward timer even in nohz mode From: Scott Wood To: Peter Zijlstra , Frederic Weisbecker , Thomas Gleixner , Ingo Molnar Cc: linux-kernel@vger.kernel.org Date: Mon, 06 Jan 2020 14:12:19 -0600 In-Reply-To: <1576538545-13274-1-git-send-email-swood@redhat.com> References: <1576538545-13274-1-git-send-email-swood@redhat.com> Organization: Red Hat Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2019-12-16 at 18:22 -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. > > To avoid this, use last_tick as-is rather than calling hrtimer_forward(). > However, in some cases the tick *will* have just run (despite being > "stopped"), and leading to double timer execution. > > To avoid that, forward the timer after every tick (regardless of nohz > status) and keep last_tick up-to-date. During nohz, last_tick will > reflect what the expiry would have been if not in nohz mode. > > Signed-off-by: Scott Wood > --- > kernel/time/tick-sched.c | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) Any comments on these patches? Thanks, Scott