All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <frederic@kernel.org>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Frederic Weisbecker <frederic@kernel.org>,
	Levin Alexander <alexander.levin@verizon.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Mauro Carvalho Chehab <mchehab@s-opensource.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Hannes Frederic Sowa <hannes@stressinduktion.org>,
	"Paul E . McKenney" <paulmck@linux.vnet.ibm.com>,
	Wanpeng Li <wanpeng.li@hotmail.com>,
	Dmitry Safonov <dima@arista.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Eric Dumazet <edumazet@google.com>,
	Radu Rendec <rrendec@arista.com>, Ingo Molnar <mingo@kernel.org>,
	Stanislaw Gruszka <sgruszka@redhat.com>,
	Paolo Abeni <pabeni@redhat.com>, Rik van Riel <riel@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	David Miller <davem@davemloft.net>
Subject: [RFC PATCH 3/5] softirq: Defer to workqueue when rescheduling is needed
Date: Tue, 16 Jan 2018 05:40:38 +0100	[thread overview]
Message-ID: <1516077640-19718-4-git-send-email-frederic@kernel.org> (raw)
In-Reply-To: <1516077640-19718-1-git-send-email-frederic@kernel.org>

One more step toward converting ksoftirqd to per vector workqueues.

Suggested-by: Paolo Abeni <pabeni@redhat.com>
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Cc: Dmitry Safonov <dima@arista.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: David Miller <davem@davemloft.net>
Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Levin Alexander <alexander.levin@verizon.com>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Radu Rendec <rrendec@arista.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Wanpeng Li <wanpeng.li@hotmail.com>
Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com>
---
 kernel/softirq.c | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/kernel/softirq.c b/kernel/softirq.c
index 255da68..441e654 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -389,16 +389,14 @@ asmlinkage __visible void __softirq_entry __do_softirq(void)
 
 	pending = local_softirq_pending() & ~softirq->pending_work_mask;
 	if (pending) {
-		if (need_resched()) {
-			wakeup_softirqd();
-		} else {
-			/* Vectors that overreached the limits are threaded */
-			if (overrun & pending)
-				do_softirq_workqueue(overrun & pending);
-			pending &= ~overrun;
-			if (pending)
-				goto restart;
-		}
+		if (need_resched())
+			overrun = pending;
+		/* Vectors that overreached the limits are threaded */
+		if (overrun & pending)
+			do_softirq_workqueue(overrun & pending);
+		pending &= ~overrun;
+		if (pending)
+			goto restart;
 	}
 
 	lockdep_softirq_end(in_hardirq);
-- 
2.7.4

  parent reply	other threads:[~2018-01-16  4:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-16  4:40 [RFC PATCH 0/5] softirq: Per vector threading v2 Frederic Weisbecker
2018-01-16  4:40 ` [RFC PATCH 1/5] softirq: Account time and iteration stats per vector Frederic Weisbecker
2018-01-16  4:40 ` [RFC PATCH 2/5] softirq: Per vector deferment to workqueue Frederic Weisbecker
2018-01-16  4:40 ` Frederic Weisbecker [this message]
2018-01-16  4:40 ` [RFC PATCH 4/5] softirq: Replace ksoftirqd with workqueues entirely Frederic Weisbecker
2018-01-16  4:40 ` [RFC/OPTIONAL PATCH 5/5] softirq: Reset vector call counter before workqueue completion Frederic Weisbecker
2018-01-17 16:56 ` [RFC PATCH 0/5] softirq: Per vector threading v2 Mauro Carvalho Chehab
2018-01-17 18:07   ` Frederic Weisbecker
2018-01-17 23:56     ` Linus Torvalds
2018-01-18  2:55       ` Frederic Weisbecker
2018-01-18  3:09         ` Linus Torvalds
2018-01-18  4:09           ` Frederic Weisbecker
2018-01-18 12:44             ` Dmitry Safonov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1516077640-19718-4-git-send-email-frederic@kernel.org \
    --to=frederic@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=alexander.levin@verizon.com \
    --cc=davem@davemloft.net \
    --cc=dima@arista.com \
    --cc=edumazet@google.com \
    --cc=hannes@stressinduktion.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@s-opensource.com \
    --cc=mingo@kernel.org \
    --cc=pabeni@redhat.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=riel@redhat.com \
    --cc=rrendec@arista.com \
    --cc=sgruszka@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=wanpeng.li@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.