Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2509891imm; Fri, 24 Aug 2018 00:02:30 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYQU0JylZrHodlJhePIsmhhk50uWrUIj8as0cNtWQ1NunBytkS6gMChKY+qHMpa7reKOl3U X-Received: by 2002:a62:25c5:: with SMTP id l188-v6mr475886pfl.179.1535094150405; Fri, 24 Aug 2018 00:02:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535094150; cv=none; d=google.com; s=arc-20160816; b=Rs3OLaIPurK8xWCtDNS42yVX1aEwVaPNhuSo4HT5kQnOLbDUUqePiVNEEEHtrvWauM yiDG9hUT4QM9IXqO9NTCE/9ip0CunxXnRWpp1FubaEAsAKZo4+rSX323uD2BNtecFK0l f/sJD3tUZ5huiBMV+p3ijr5mgMPKef2/go/HaL7w5t99j6ca/utwB13u0pnTYYyBdeuq hw7TAIJxyCcyjJcc9hwssRJOgF1b2sAmnqETIEWZvyVRC3tcdi7F2dRgApDx0nM34mw5 3ldluHwVae3t/kQY6O0nRm4SOEY8d6IhNKP6MccbweCgayZQ9JuJp49J1cX6cEni88rc ikeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=69xbSC5nmU2X2LRcv5xm1Q5hegSZeLtD+VW/W/ncbvg=; b=OD5KXM7My9D+EHurqCTaYpOsuadozfDg/RiRD4CcVP/jJ3FMDUvu+gCIDtq0rsBLi3 ldmUDcPHzA36gTLHA8ZfWHaCg+2ceb8ZDwLEal5Bwu/eqex04i0B8/nyxePT9ZISJxzx 02lVG2zODun0PApDX0yzt7jNJmH8xnXwylIiqOSQ26O/NzfTGN2RJjyOdp4qCbmGa5EY QpRSKKIFqhGLHoR0aAcJ58o+MO0gdOgkbXy/JWdg4re4Q/BGAUMefIcpdwMqOsI2V2cK rHn4k1+FwV3rVE000z1bGqPIoiQ/Iin1wpbF22ogqsz20w0ToXNhJk42o3KE0G6PLPLo wMPA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o3-v6si6045358plk.321.2018.08.24.00.02.13; Fri, 24 Aug 2018 00:02:30 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727481AbeHXKeZ (ORCPT + 99 others); Fri, 24 Aug 2018 06:34:25 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:39467 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726572AbeHXKeZ (ORCPT ); Fri, 24 Aug 2018 06:34:25 -0400 Received: from p4fea45ac.dip0.t-ipconnect.de ([79.234.69.172] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1ft65f-0001fj-5k; Fri, 24 Aug 2018 09:01:03 +0200 Date: Fri, 24 Aug 2018 09:01:02 +0200 (CEST) From: Thomas Gleixner To: Greg KH cc: Grygorii Strashko , Frederic Weisbecker , LKML , Ingo Molnar , Anna-Maria Gleixner , stable@vger.kernel.org Subject: Re: [PATCH] nohz: Fix missing tick reprog while interrupting inline timer softirq In-Reply-To: <20180824061750.GA20523@kroah.com> Message-ID: References: <1533077570-9169-1-git-send-email-frederic@kernel.org> <8ecb9229-4c14-6967-0863-15b47cefd251@ti.com> <20180824061750.GA20523@kroah.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 24 Aug 2018, Greg KH wrote: > On Thu, Aug 23, 2018 at 05:57:06PM -0500, Grygorii Strashko wrote: > > This patch was back ported to the Stable linux-4.14.y and It causes regression - > > flood of "NOHZ: local_softirq_pending" messages on all TI boards during boot (NFS boot): > > > > [ 4.179796] NOHZ: local_softirq_pending 2c2 in sirq 256 > > [ 4.185051] NOHZ: local_softirq_pending 2c2 in sirq 256 This printout is weird. Did you add something here? > > the same is not reproducible with LKML - seems due to changes in tick-sched.c > > __tick_nohz_idle_enter()/tick_nohz_irq_exit(). > > What changes do you think fixed this? > > > I've generated backtrace from can_stop_idle_tick() (see below) and seems this > > patch makes tick_nohz_irq_exit() call unconditional in case of nested interrupt: > > > > gic_handle_irq > > |- irq_exit > > |- preempt_count_sub(HARDIRQ_OFFSET); <-- [1] > > |-__do_softirq > > > > |- gic_handle_irq() > > |- irq_exit() > > |- tick_irq_exit() > > if (!in_irq()) <-- My understanding is that this condition will be always true due to [1] Correct, but that's not the problem. The issue is that this happens in a softirq disabled region. Does the below fix it? Thanks, tglx 8<-------------------- diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 5b33e2f5c0ed..6aab9d54a331 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -888,7 +888,7 @@ static bool can_stop_idle_tick(int cpu, struct tick_sched *ts) if (unlikely(local_softirq_pending() && cpu_online(cpu))) { static int ratelimit; - if (ratelimit < 10 && + if (ratelimit < 10 && !in_softirq() && (local_softirq_pending() & SOFTIRQ_STOP_IDLE_MASK)) { pr_warn("NOHZ: local_softirq_pending %02x\n", (unsigned int) local_softirq_pending());