Received: by 10.223.176.46 with SMTP id f43csp1165925wra; Fri, 19 Jan 2018 07:48:02 -0800 (PST) X-Google-Smtp-Source: ACJfBouSKB50YQkg6CnzAdae3Dydo5dUwX2u5kdQR9mZDfk3yH5dF/ktatvEidk0zZMs347NqxFu X-Received: by 10.98.133.193 with SMTP id m62mr34232709pfk.18.1516376882550; Fri, 19 Jan 2018 07:48:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516376882; cv=none; d=google.com; s=arc-20160816; b=aqxyBuhnRnER649TaeMlZlJEsZ09gnTLB9EIVNjctExNzDpstthCXMdVgOB2M/6VOH IxSW1LVH0qD+mNm5Uvj4nFQmBbYAQUWL8Gp4tbEC9DX+10ZiMOfCdy3nzx3RSCeQ46XX XFjpCIDCpXXUdZq0LjKtFirVldvv9If0P7zflCsjkYseJp7qg+KCgthn7GHK4xRZpg2d WWqFx7DJ7Lq8Qbfsjz2pQ7LA/iOtWvxy+TKeiq7Q+3o8KuwpMLsPLya2MWiI1Hf+5Zkq c3wQ+H6LcFyGaeGob9/vjTTCNkVGPV02JXHALwtoXpQ5KyOaUNotVXfP4CzjRyn8BDgY Toew== 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:dmarc-filter:arc-authentication-results; bh=ElvZ48hHPfbXBlAz1mP00xBOiZVXWYD8OJGm7EJuq18=; b=DK97MYbS0tRYa91PhL6NWMhBqGi1NnlGw/8NQNsSKRqV6fLH79hqWD73uddxn6x9dH vMcsa9k8nGfWhEmSv6s4K/sku58a2nrWm5cq3TVHw5nNjWGonrcHTB7Mr7I49mZOy92z LzX1ytT8wJoGjJaLZI3UvE3T5hhcIWahurIQHNRLNmTWzjYcjA/gi9Lq/h8HDHlI6E6J VL4+mnmPN9lsf595v5FBjML6A89PmlQn+q1rLGlJ+3/9DjKWw6jHwOm2aSGRKnenAGRF 5B6WH7GbiXrXNZXbYh5prtSkTyhhhj/6TK07fdS9n5qds2mhmf4q6dndIGMYfddwyzCS e1Jw== 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 c7-v6si906128plr.828.2018.01.19.07.47.48; Fri, 19 Jan 2018 07:48:02 -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; 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 S1755910AbeASPrH (ORCPT + 99 others); Fri, 19 Jan 2018 10:47:07 -0500 Received: from mail.kernel.org ([198.145.29.99]:58588 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756069AbeASPqh (ORCPT ); Fri, 19 Jan 2018 10:46:37 -0500 Received: from localhost.localdomain (i16-les03-th2-31-37-47-191.sfr.lns.abo.bbox.fr [31.37.47.191]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 195472175B; Fri, 19 Jan 2018 15:46:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 195472175B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=frederic@kernel.org From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , Levin Alexander , Peter Zijlstra , Mauro Carvalho Chehab , Linus Torvalds , Hannes Frederic Sowa , "Paul E . McKenney" , Wanpeng Li , Dmitry Safonov , Thomas Gleixner , Andrew Morton , Paolo Abeni , Radu Rendec , Ingo Molnar , Stanislaw Gruszka , Rik van Riel , Eric Dumazet , David Miller Subject: [RFC PATCH 3/4] softirq: Defer to workqueue when rescheduling is needed Date: Fri, 19 Jan 2018 16:46:13 +0100 Message-Id: <1516376774-24076-4-git-send-email-frederic@kernel.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516376774-24076-1-git-send-email-frederic@kernel.org> References: <1516376774-24076-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 One more step toward converting ksoftirqd to per vector workqueues. Suggested-by: Paolo Abeni Suggested-by: Linus Torvalds Signed-off-by: Frederic Weisbecker Cc: Dmitry Safonov Cc: Eric Dumazet Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Andrew Morton Cc: David Miller Cc: Hannes Frederic Sowa Cc: Ingo Molnar Cc: Levin Alexander Cc: Paolo Abeni Cc: Paul E. McKenney Cc: Radu Rendec Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Wanpeng Li Cc: Mauro Carvalho Chehab --- kernel/softirq.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/kernel/softirq.c b/kernel/softirq.c index becb1d9..bb0cffa 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -369,16 +369,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 got re-enqueued are threaded */ - if (executed & pending) - do_softirq_workqueue(executed & pending); - pending &= ~executed; - if (pending) - goto restart; - } + if (need_resched()) + executed = pending; + /* Vectors that got re-enqueued are threaded */ + if (executed & pending) + do_softirq_workqueue(executed & pending); + pending &= ~executed; + if (pending) + goto restart; } lockdep_softirq_end(in_hardirq); -- 2.7.4