Received: by 10.223.176.46 with SMTP id f43csp4487062wra; Tue, 23 Jan 2018 10:02:54 -0800 (PST) X-Google-Smtp-Source: AH8x2271BdR3X5S5e0OfSYdmS/tF0Wi0JWoZ7HsOQdkW5BVNQox102QRar1KjZbMuQTjIRn8tDcB X-Received: by 10.107.4.133 with SMTP id 127mr4708810ioe.209.1516730574406; Tue, 23 Jan 2018 10:02:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516730574; cv=none; d=google.com; s=arc-20160816; b=bG377uxo6w5jLwn3l53jLMMAMWL8TDUtCFgEROZNhguC/7ddMBnsXm0MG/jzRli26I PhhbC33DhQL0jPw10rX+He5muW4Flb9wTydVhVdoi/xYw0xVzpBaVGWXZsz3F0jMDYch IQ3VW0szhQt0gfuarTZidf7qTc/ggwU+30VAvokqlb1639nfsB8chtfbv57FOyBQXbiq jk03o1rCfbtQus3Ite8LDpIIPRDPgVdehhr20NBejg3zQlTYfcEtbG7o7vOfRQevCVZv zjrMJA2b2sAUWqQLsRHMpyJsGHCJ5I3OsVU5jHf/0wOgyCPiRgtAll/4z9bMp9Vjg+7Y 8lyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=zpduCTLGX43vcVTRpMeKEcDUjC1iMbxzXgpYY8MWRAo=; b=EfqhTAyrOHy4tVaGexQKpu9xwTvmDOWQQIvvdVXwzn4xna9+jueCqH/DNaX29B0Jxl iqx6MXZmGQ9C+o+qsFdmSBUcoFUQo6RTxsaQ4hhGaAD6yas2h8kU7IXXmez7C5YjGDs9 qIq0wp8/VUzpl8w2WqQqrr45f+C558SODe+QqIAkG8KnYOR+MZBDw7RMnAgYLJwYag7b rqHx/EyD6gZtlNbY7EYJ3PGc0JOQPZS+LCgk3Xp838dvxbx2sb5fWW7QoJ1xYSqYklRg 1Uo95UE/ij3Dl/luwvk029xNSodbz4TZR5GCKcdCyFNkf2NyebERdSGX905bL7cZBHpH B3Iw== 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 c187si9146275ith.149.2018.01.23.10.02.40; Tue, 23 Jan 2018 10:02:54 -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 S1751940AbeAWSCR (ORCPT + 99 others); Tue, 23 Jan 2018 13:02:17 -0500 Received: from mout.gmx.net ([212.227.15.19]:55980 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751451AbeAWSCQ (ORCPT ); Tue, 23 Jan 2018 13:02:16 -0500 Received: from homer.simpson.net ([185.191.217.115]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LoEPJ-1fJgIH3OLx-00gD8r; Tue, 23 Jan 2018 19:01:25 +0100 Message-ID: <1516730480.6999.2.camel@gmx.de> Subject: Re: [RFC PATCH 0/4] softirq: Per vector threading v3 From: Mike Galbraith To: Linus Torvalds , Paolo Abeni Cc: David Miller , Frederic Weisbecker , Linux Kernel Mailing List , Sasha Levin , Peter Zijlstra , Mauro Carvalho Chehab , Hannes Frederic Sowa , Paul McKenney , Wanpeng Li , Dmitry Safonov , Thomas Gleixner , Andrew Morton , Radu Rendec , Ingo Molnar , Stanislaw Gruszka , Rik van Riel , Eric Dumazet Date: Tue, 23 Jan 2018 19:01:20 +0100 In-Reply-To: References: <1516376774-24076-1-git-send-email-frederic@kernel.org> <1516702432.2554.37.camel@redhat.com> <20180123.112201.1263563609292212852.davem@davemloft.net> <1516726652.2554.58.camel@redhat.com> Content-Type: text/plain; charset="ISO-8859-15" X-Mailer: Evolution 3.20.5 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:h9/Py40tiF7pTDgwkdAh2T42YJlelyGRpAp2ALb5UOO0WHklvbO BnPHm3f486fteWbX1vQbcSto83VT1xsj1E2V52q4qMBNX+WYWgmcd1qneAPN3/WVUGoKuvD FTfaiQdFgUYmj37irHPM36lwtFOT7PEKYKhf2ugcl/GCyIN24dnA5tlOIk1TG6Who+7THYt MBXXr5FFzk0/hiWiHL6Nw== X-UI-Out-Filterresults: notjunk:1;V01:K0:RNYC7WhtZ+I=:LatoWhtDsBuzTgTDlga1bn z8shm6nia9wyk4XZSnI+SNWQb2ZFChU86nxjllWSy0uF4cqMyKpry3LQ8j81Q+YHImCdVEOkO gwy4aJPcoRIpDXdm9o3S/WFwf3/cUCosuu39V1zGB+xiEFsQqz6v4pPWH6NxM2eRV42Ev85zi QkGwh5G+6PEEi+fPA3IeZ62cIczKDpO/mNuel+vQ9R3xH673gYhpWlIq5zgOZ4HeSWK57L9DO F9cMSM911pH4Q5yb7TnrLa6NHqKLrCm+urkddoe79k9w3P8Aid575bhHGsdE6zv+9HemRlnTi CXrKDOooHTccMkPTdhjFPEuxXcJeL1OpGvYJ1gpAjziAjDZmbY68wvUACxau5cTqZbXVoHX5S iR/WVpLUEjKP9/DgZtZO6ULaGO7cShFFqMfR9mOFvx5qRde1wySe6APfNpNOlhFyMvb+FRk4Z T1snDVN4TeGwHFoq15nrZTJSzCsR8cYwxPBtrjJzJz5vAGXYpj8cChpI5eaB64Qc/4JXGI7J0 vbQxkCCAXeotZlTyC2Vlvm5w2fuU6IHzGMDKe289l+iwufbFUcvNnplBPpTvUB8udXLClZ+/+ nMlQIAMFukEGxUsHaEUcTDFQAqQFrCKQ6GfwaCidDJ5BhsosvfpomqJEyrBH+57LixVEFdTT/ XdKSppf9HzuWO4WOBanb8ymOC7G+ACItqQVl2TWFC6BfM6EDT5JG7UI+UoaHISR5PRtKiY+GT I+X2kFiOp+UTakUu4sDvp8hQBmC1+VTRPFKZ9pBib/ouy1Pr7Mri1L2NAuMqSqHogVvTYwdEn aFGD6WcCAdprnTbWfhMMEsHZJOHQD6rcQhLp/VADBCHU+5sZkc= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2018-01-23 at 09:42 -0800, Linus Torvalds wrote: > On Tue, Jan 23, 2018 at 8:57 AM, Paolo Abeni wrote: > > > >> Or is it that the workqueue execution is simply not yielding for some > >> reason? > > > > It's like that. > > > > I spent little time on it, so I haven't many data point. I'll try to > > investigate the scenario later this week. > > Hmm. workqueues seem to use cond_resched_rcu_qs(), which does a > cond_resched() (and a RCU quiescent note). > > 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 folks aren't careful with workqueues, they can be a generic starvation problem. Like the below in the here and now. fs/nfs: Add a resched point to nfs_commit_release_pages() During heavy NFS write, kworkers can do very large amounts of work without scheduling (82ms traced). Add a resched point. Signed-off-by: Mike Galbraith Suggested-by: Trond Myklebust --- fs/nfs/write.c | 1 + 1 file changed, 1 insertion(+) --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -1837,6 +1837,7 @@ static void nfs_commit_release_pages(str set_bit(NFS_CONTEXT_RESEND_WRITES, &req->wb_context->flags); next: nfs_unlock_and_release_request(req); + cond_resched(); } nfss = NFS_SERVER(data->inode); if (atomic_long_read(&nfss->writeback) < NFS_CONGESTION_OFF_THRESH)