Received: by 10.223.176.46 with SMTP id f43csp152307wra; Tue, 23 Jan 2018 18:03:36 -0800 (PST) X-Google-Smtp-Source: AH8x227R8foi3eC8HAjVLGpydFI0fE95AHew/1Drqu+OUq96cM7sBHRAOHte6SxOttjFGh5VIE6w X-Received: by 2002:a17:902:b08a:: with SMTP id p10-v6mr6516344plr.133.1516759416319; Tue, 23 Jan 2018 18:03:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516759416; cv=none; d=google.com; s=arc-20160816; b=OixtIFPBxVY0L6CirMJKE6R3U41NvIUztR0rMP+k7Z21dbjyKb3NbngJacpa9ugL+M 84juJMZ7YB92LP8WYh9hVbztwHkx22SAGuzBj7J6oPnx1VwPD60T1GBvn6LsNR8oZQ0y QrZsk2lXXgxV2YxmB9yoOeStnLVNAO2gSR8SKRRPtr09TExWDMKq7EyU2f9Tqtwl0mZ5 HbdhM9gppLiOV0I5ePX0GkDPi5IW3rpwi8AwyziW1S5j8gCvty303PDoLerGwBUefPsY X0jWVF8QjQyVVrkAofwfaNhWlQsMCnLQixHt0af0jcILilatIb92lsulNsRSCzS+aXRP QQHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dmarc-filter :arc-authentication-results; bh=fDXVLXq3A0oINFLOdQnszXpoayTKvkDnKImC8AL66DM=; b=KEssv8TPMYgkJED3TcKKMIybSW2SPh5sKqe6M0/6zAf4hJCLW0FslXw8OTakl19BEq EgilXr0jx4kOT/CkiUohaMumeXPO8xbhJ/eyn+jWvk0NtwMYsXRDZrnBC4gbZX1duUwJ 4Vhw+/3vIm7LJQHor4DjyLDJQ4dHqcURPNpQB1uqro9aoqoxkuP3iGSG/CS/GVdAAt5E YdT1uynLWru+kTvSGECsJPNcI03UtNDM/zdPyKIvC/m47JQe3PuE8UFPslT44/p671oD C2OMpY6wuQUUAvBB/uireoi2fDcRB2dcEvyryg17nnL4jJml6m4qTftOUJzxuWQiF2G2 YhVw== 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 b130si15594195pga.61.2018.01.23.18.03.22; Tue, 23 Jan 2018 18:03:36 -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 S1752157AbeAXCBk (ORCPT + 99 others); Tue, 23 Jan 2018 21:01:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:42378 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751834AbeAXCBj (ORCPT ); Tue, 23 Jan 2018 21:01:39 -0500 Received: from mail-io0-f171.google.com (mail-io0-f171.google.com [209.85.223.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 161CB217A4 for ; Wed, 24 Jan 2018 02:01:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 161CB217A4 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 Received: by mail-io0-f171.google.com with SMTP id l17so3132721ioc.3 for ; Tue, 23 Jan 2018 18:01:39 -0800 (PST) X-Gm-Message-State: AKwxytcXA3VbMLLkn4dZ4KVuQRDLhopa3rZk0RF3LNuSl4lYlv3D6zFz BQFEE7CRRA1vDeCv5x0mimBg4PVKLWQtPK1bnuk= X-Received: by 10.107.147.3 with SMTP id v3mr6796913iod.78.1516759298484; Tue, 23 Jan 2018 18:01:38 -0800 (PST) MIME-Version: 1.0 Received: by 10.79.202.198 with HTTP; Tue, 23 Jan 2018 18:01:37 -0800 (PST) In-Reply-To: <20180124015734.GA11302@lerouge> References: <20180123.112201.1263563609292212852.davem@davemloft.net> <1516726652.2554.58.camel@redhat.com> <20180123.132424.1035340800864767853.davem@davemloft.net> <20180124015734.GA11302@lerouge> From: Frederic Weisbecker Date: Wed, 24 Jan 2018 03:01:37 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 0/4] softirq: Per vector threading v3 To: David Miller Cc: torvalds@linux-foundation.org, pabeni@redhat.com, linux-kernel@vger.kernel.org, alexander.levin@verizon.com, peterz@infradead.org, mchehab@s-opensource.com, hannes@stressinduktion.org, paulmck@linux.vnet.ibm.com, wanpeng.li@hotmail.com, dima@arista.com, tglx@linutronix.de, akpm@linux-foundation.org, rrendec@arista.com, mingo@kernel.org, sgruszka@redhat.com, riel@redhat.com, edumazet@google.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-01-24 2:57 UTC+01:00, Frederic Weisbecker : > On Tue, Jan 23, 2018 at 01:24:24PM -0500, David Miller wrote: >> From: Linus Torvalds >> Date: Tue, 23 Jan 2018 09:42:32 -0800 >> >> > But I wonder if the test triggers the "lets run lots of workqueue >> > threads", and then the single-threaded user space just gets blown out >> > of the water by many kernel threads. Each thread gets its own "fair" >> > amount of CPU, but.. >> >> If a single cpu's softirq deferral can end up running on multiple >> workqueue threads, indeed that's a serious problem. >> >> So if we're in a workqueue and it does a: >> >> schedule_work_on(this_cpu, currently_executing_work); >> >> it'll potentially make a new thread? >> >> That's exactly the code path that will get exercised during a UDP >> flood the way that vector_work_func() is implemented. > > It shouldn't create a new thread unless all other workers in the CPU > are voluntarily sleeping while executing a work. Also since softirqs > can't sleep, we shouldn't even have two vectors running concurrently > on workqueues. > ...unless I misunderstood workqueue internals or missed something, in which case we may try ordered workqueue.