Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2285978imu; Thu, 24 Jan 2019 10:08:25 -0800 (PST) X-Google-Smtp-Source: ALg8bN5VjnfWD6GG4G6npZ/oL++Xe0Axjh7wpqRmcHW5sBxqzp3VbzCKXnqsbo+oAeZZAQYUCNt/ X-Received: by 2002:a65:47ca:: with SMTP id f10mr311089pgs.166.1548353305618; Thu, 24 Jan 2019 10:08:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548353305; cv=none; d=google.com; s=arc-20160816; b=LrroId08zJtbjLl5rWuKRfn9GLTem0zlKchDvYo+K6CZEd38UbbdxUdOwfwhYfFn7d tmoBCVqtuRrH+n+zC7Wrl9+EbGevJ4d0HmTAIPo9tsYskqMclJSGqJejMe6qUUXS9i72 Uy3Jwc73yvfias5ucbMZE07gy8fdqIJRADzJPtPsvfTI5ytieKOxg5aLijBAXvVql9BA NUoywoTGScnSK8cZk/oTzhb6PCCALIvULXNuwcL0urvtgy/MDgFP7aLGs04/k/O5i8qb RgjZj+moMc9SF8eo/dm8Ok3pW6ArVLbVQqDZVJh9+1wlPyrH1shzc48wh0Ak4+BNU1XO EK/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=tjMXrhI4SQ+brncYCMGz3khd2K34m9mAQPJLSGNTKiU=; b=qr4Wyo1HUMoJE3CI8QkXFV/Hb4l61sZyPf9a968EBZr8jM1jfQuNg4rRLkuWx+kFGP eDHnyrPH9NEwQMhzTyFAa+syZ7+/BudNZ8wuaZqmp8o2EUk9Y5kjNiM5UpsvSVRkiHWW liyqLo5+ed+7B8ym0C6JIM/zjQoJsaWDUYojqb+amgLLhCr8qsqQYPgDxOGUqfShPkhS /cCwCOy1Q6B/e0xsCeWz5QRthnTRlygHEcjXX5LmYFGRmmGghBBqQTZCoarA8gJfQsgN 65j+oYlI4mEKHCpRL3IsLmodkh4yn8RwDdr3Fo5GTT/d4DibDvuT6W9cYjHOEyUMLJeD bODA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UHwd77B6; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w2si22782268pfg.78.2019.01.24.10.08.09; Thu, 24 Jan 2019 10:08:25 -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=@gmail.com header.s=20161025 header.b=UHwd77B6; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729321AbfAXSHr (ORCPT + 99 others); Thu, 24 Jan 2019 13:07:47 -0500 Received: from mail-lj1-f179.google.com ([209.85.208.179]:44459 "EHLO mail-lj1-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729286AbfAXSHn (ORCPT ); Thu, 24 Jan 2019 13:07:43 -0500 Received: by mail-lj1-f179.google.com with SMTP id k19-v6so6050506lji.11 for ; Thu, 24 Jan 2019 10:07:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=tjMXrhI4SQ+brncYCMGz3khd2K34m9mAQPJLSGNTKiU=; b=UHwd77B6TWamXj+SgO085iAtcURGIJKeTyjep2yXVn3I6Q52iqv1RftB6+vejz8I62 DvRhdXHAIFiaWO8Xh6TsgbGRGpy5lxzCzHTTY9mN6C0Dwf0WdlmApTSx7dVEm1c4cuQU xCf7hC0rlYWJjqbe8qbxXducPg2bE6NbklzjejoWkGRJxV5h2ByuS3p0cPeB8X+82JzP MUffBChH0cX/LOTEl3uFRZmgO3HF5i6AODxMoPqZIwmOaKWJDZVAvbSWJA+MJFpeSuo1 xkDmGQZaVBhUPFC/3fuP/aEcYOkWY/+hqkYXK4M2Pu6id4WyjkNMb9T28Rgp76W2FsTr mXrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=tjMXrhI4SQ+brncYCMGz3khd2K34m9mAQPJLSGNTKiU=; b=Od9JGJ61BmZFZbNad/ApRYTwN2yG3I/8LLif/L7lpCljbXCeg8i3KW1vKsMFKdpPwX TGVSEBDSf6uad1UlvEMCFMvesm/KARt69aVaN0PO0bJOhU5k1/8krnWYfZEQZv2RZrL0 1snGEh9Nv/ttEYPZyU147YNWiaDC/aHAY+Sx2V9yLU8JgIp0oU3Y3biafhRbN0BTFnLA 8K6urGzXB0QKzbOiOIfcb1u1GOT2eRH8PRxcCMLlBtG2r6MV0IT1Qq/cweXqbHNI8038 5x7YmfKWCuOesKs/esM5RhnTmGir5QVjnu9/FddH+sDEkD41fuDz9tdT12oklpHGGB8X 0cGQ== X-Gm-Message-State: AJcUukcVt0cM/Do+ioJSHcd3Dz5rWuvDx46xDJ/dSjEp4k1WbTPgS5M4 Fy1H0uT+E+OecO3PF2Pjge4= X-Received: by 2002:a2e:880a:: with SMTP id x10-v6mr6806883ljh.174.1548353261281; Thu, 24 Jan 2019 10:07:41 -0800 (PST) Received: from uranus.localdomain ([5.18.103.226]) by smtp.gmail.com with ESMTPSA id q67sm1082157lfe.19.2019.01.24.10.07.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 24 Jan 2019 10:07:40 -0800 (PST) Received: by uranus.localdomain (Postfix, from userid 1000) id 185C1460419; Thu, 24 Jan 2019 21:07:40 +0300 (MSK) Date: Thu, 24 Jan 2019 21:07:40 +0300 From: Cyrill Gorcunov To: LKML Cc: "Paul E. McKenney" Subject: [PATCH -next] rcu: rcu_qs -- Use raise_softirq_irqoff to not save irqs twice Message-ID: <20190124180740.GD2332@uranus.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The rcu_qs is disabling IRQs by self so no need to do the same in raise_softirq, instead we can save some cycles using raise_softirq_irqoff directly. CC: Paul E. McKenney Signed-off-by: Cyrill Gorcunov --- kernel/rcu/tiny.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-next.git/kernel/rcu/tiny.c =================================================================== --- linux-next.git.orig/kernel/rcu/tiny.c +++ linux-next.git/kernel/rcu/tiny.c @@ -65,7 +65,7 @@ void rcu_qs(void) local_irq_save(flags); if (rcu_ctrlblk.donetail != rcu_ctrlblk.curtail) { rcu_ctrlblk.donetail = rcu_ctrlblk.curtail; - raise_softirq(RCU_SOFTIRQ); + raise_softirq_irqoff(RCU_SOFTIRQ); } local_irq_restore(flags); } Subject: [PATCH]