Received: by 10.223.176.46 with SMTP id f43csp148314wra; Tue, 23 Jan 2018 17:58:56 -0800 (PST) X-Google-Smtp-Source: AH8x224u6PaN4yqcJ3b0x9jy5rqrMoeV0JP4hDi4g2MzFrh40GY6qgBf8JFz9PHf61/A6ukNTFSF X-Received: by 10.99.98.66 with SMTP id w63mr9500650pgb.10.1516759136118; Tue, 23 Jan 2018 17:58:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516759136; cv=none; d=google.com; s=arc-20160816; b=CDQLO1CTbXZFWqsf9UxJyp5O37al+WDIijG8mPcxS8iP/7B7VHWH+b3QtVz9KllB4v qX2VI9JUsk1DzbgSd35Y8l6pslMzM5jYkCel6+TtSmVRAjSFwnwyAEm6ux8V/3z1pooX wffKJEnHnPuBcbfglDeR3YnJdCR+wLEZ1Jrayn+A1MHKijZKh15zBqkIABch4TUWFr8i 04j0thyAub8zmsaCxQ2sm2Fk/UCjgEvPI9c9dMXTylf/gddcUOr9NfDVtrMbYfSXAt76 uchmkZCMW/tssOYMbfBJf3QiCOxJCEYRnhWSn/hCTjargOHKRl19U1ixhZ2R9hc6JC0a OaNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dmarc-filter:arc-authentication-results; bh=pt56P7USzscs86lDLJ47gsnjFVN566YAyH0cB2d+3kc=; b=wi9ppW0bws6pIbaaTUPnEHyYjYdpOKxs1mmWRe8kbz5yFQx2GpmfFcWtYfCbZxRRpf FvPb1Zk4wnhwBkIaOHqqjHaGB1GKv3WinR6O/U+5Pb9gTmI7VFtcPz+Yir+Kb1K0EtXT YRAfaT6tr0vgBebGTHXK3HObiO5/rjEqrL+cbpy+thrfcj7jgLyZqw1lSVFUWyWEghAW tfvRk4Nu+n6nUbix4gnJDANEOJKndN/jP3sYD87z8Nb+FDmiJARR1rpkicyASlCjaTlk jxIDrbaEzT4Nu+UomfLzyajCCZVv/qmkhjfaskU5Yf76EGQh0rQ3IInAHdqzsR5nyMvf kAAg== 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 h132si15294635pgc.309.2018.01.23.17.58.42; Tue, 23 Jan 2018 17:58:56 -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 S1752221AbeAXB5m (ORCPT + 99 others); Tue, 23 Jan 2018 20:57:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:40940 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751964AbeAXB5l (ORCPT ); Tue, 23 Jan 2018 20:57:41 -0500 Received: from localhost (i16-les03-th2-31-37-47-191.sfr.lns.abo.bbox.fr [31.37.47.191]) (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 F1F3D2178D; Wed, 24 Jan 2018 01:57:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F1F3D2178D 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 Date: Wed, 24 Jan 2018 02:57:36 +0100 From: Frederic Weisbecker 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 Subject: Re: [RFC PATCH 0/4] softirq: Per vector threading v3 Message-ID: <20180124015734.GA11302@lerouge> References: <20180123.112201.1263563609292212852.davem@davemloft.net> <1516726652.2554.58.camel@redhat.com> <20180123.132424.1035340800864767853.davem@davemloft.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180123.132424.1035340800864767853.davem@davemloft.net> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.