Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1510439imm; Wed, 10 Oct 2018 16:14:02 -0700 (PDT) X-Google-Smtp-Source: ACcGV62n2eIHWYSYDkUyDVJOEosKDiME3nFj1WEpK59Aij5XC05rwBQdCit7Hb7MezAxtROf7Itr X-Received: by 2002:a17:902:24a5:: with SMTP id w34-v6mr14758424pla.73.1539213242514; Wed, 10 Oct 2018 16:14:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539213242; cv=none; d=google.com; s=arc-20160816; b=kKzU8OH49cSw7PKix/kQcXuvUWViHwiU75g0wGpzBHw4EK/2QyarofXOoJS59hjRnG lZcFrAwejQaToBJoqElp+ObpvBTS0pD3/wzKI/agrEkWGfU1Mo/6fjCIbHJn/SNbPPwD GZztMqIDOFxwPvhoXiirAoYz0Lxpv3nKJkyh5VR8P1RnnkNRQe/OTv7jrY0a8H4/coeJ aidnJYYX792zWIlZPLC6XA1ykaIzgZTOrU8YnBYw89rxFIjWw5bMU/D+L+cK2YNA6A6S OmHdjUJJlBndsG4a7JdFhbVPHKjWb10t/HN0T+clNvmycICoESBNOBxNkRnaKLXwsylV 2lzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=NwaLfDV+OwXK2X3TFcsuoe3Ox4WyDrBjB0EEBH6Pm+c=; b=iK45NXt8c5E8aKAemQuq1R99oggkM8wEk1t6267zWuGlobghbnIOIGrf3TSK4MNbNm /OkWQhsa/TRcKVAhfADaCDgTaJKeIHLueFprQR3d+nHj2JLh+osKNz/GNJvc4O2SqiA+ CRk7HMAfxHnhrPHj2OLxoL/IzSEV/S4G5fgUnt1rDDoR7nK2Ecn0AgJClF22JT/aJgxC pdUK5mMpssm+/6Yrc6P4nEStz0sacVazK44crCvZDtT7ujbHUyeOFTA5/WkRi2AfC/GZ hpw1KGZLQL+RGjblsR2nqSA7l/moqqf+na0iMN67QZuuqHcpIfxAplJEQWB4PJ36QcH7 kPtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Rzm/HOCQ"; 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 t7-v6si24955556plz.427.2018.10.10.16.13.45; Wed, 10 Oct 2018 16:14:02 -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; dkim=pass header.i=@kernel.org header.s=default header.b="Rzm/HOCQ"; 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 S1727218AbeJKGhY (ORCPT + 99 others); Thu, 11 Oct 2018 02:37:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:35550 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727181AbeJKGhX (ORCPT ); Thu, 11 Oct 2018 02:37:23 -0400 Received: from lerouge.suse.de (LFbn-NCY-1-241-207.w83-194.abo.wanadoo.fr [83.194.85.207]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D6A8E21528; Wed, 10 Oct 2018 23:12:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539213182; bh=PAxRwkEKHEF+hqaxVhR+NiJSRGpcJz+aaMYh0mFiQAQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Rzm/HOCQiHfw2EZlq3Ipp0F18UjaNvH8NRYNSHFg5Skn2anuOd3/TD4+6Cl/nhzGS frT7aAgtlofemNODjYIkVxUV6qmkLZwaqImvBRFbvhuw6Zf+EdXp0lDp5LGP6pjvxn Tfk1EwHJY2Qr13Lcimd8BrQTjHdWY4Bmat3/Cjw4= From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , Sebastian Andrzej Siewior , Peter Zijlstra , "David S . Miller" , Linus Torvalds , Thomas Gleixner , Frederic Weisbecker , "Paul E . McKenney" , Ingo Molnar , Mauro Carvalho Chehab Subject: [RFC PATCH 10/30] softirq: Check enabled bits on the softirq loop Date: Thu, 11 Oct 2018 01:11:57 +0200 Message-Id: <1539213137-13953-11-git-send-email-frederic@kernel.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1539213137-13953-1-git-send-email-frederic@kernel.org> References: <1539213137-13953-1-git-send-email-frederic@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Frederic Weisbecker Check the enabled vector bits on softirq processing. Those that are pending but disabled will be ignored and handled by the interrupted code that disabled those vectors. No effective change yet as the core isn't yet ready for softirq re-entrancy. All softirqs should be enabled all the time for now and driven through preempt_count(). Signed-off-by: Frederic Weisbecker Cc: Ingo Molnar Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Linus Torvalds Cc: David S. Miller Cc: Mauro Carvalho Chehab Cc: Paul E. McKenney --- kernel/softirq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/softirq.c b/kernel/softirq.c index fdb2574..75aab25 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -263,7 +263,7 @@ asmlinkage __visible void __softirq_entry __do_softirq(void) */ current->flags &= ~PF_MEMALLOC; - pending = local_softirq_pending(); + pending = local_softirq_pending() & local_softirq_enabled(); account_irq_enter_time(current); __local_bh_disable_ip(_RET_IP_, SOFTIRQ_OFFSET); @@ -271,7 +271,7 @@ asmlinkage __visible void __softirq_entry __do_softirq(void) restart: /* Reset the pending bitmask before enabling irqs */ - softirq_pending_nand(SOFTIRQ_ALL_MASK); + softirq_pending_nand(pending); local_irq_enable(); @@ -304,7 +304,7 @@ asmlinkage __visible void __softirq_entry __do_softirq(void) rcu_bh_qs(); local_irq_disable(); - pending = local_softirq_pending(); + pending = local_softirq_pending() & local_softirq_enabled(); if (pending) { if (time_before(jiffies, end) && !need_resched() && --max_restart) -- 2.7.4