Received: by 10.223.176.46 with SMTP id f43csp849678wra; Wed, 24 Jan 2018 06:54:58 -0800 (PST) X-Google-Smtp-Source: AH8x226JTf0UiNsNbofRicjVkBO3mUt0do10hcisIaeS38U5AUEamiVjU9v22eXV2ptPbAJYdSke X-Received: by 10.98.91.193 with SMTP id p184mr13119330pfb.16.1516805698829; Wed, 24 Jan 2018 06:54:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516805698; cv=none; d=google.com; s=arc-20160816; b=miZB+u1dq19/2+MxDeOHCbVKpbwHwq09m5L0feVnvZWQ5XkeaHPNufnwGG1pEFnAQD hl5BwsqUC0NMF4yrT0zddwcSnzPs0a6pfXMW+yDKpc8BUath7Q88ZUGBVDnwyEua4UUy 0JUPWViK8hY3jtUqHfjTQzZujRf9mkLZgw0pSy2Jlq7/W1rNtJ1wV6akP7RUQo1VCAP8 aR6Bw2LkjOglq1ons01Jw6u+3Kis153mjjGzlzUK7ZbjWLxGgU8eub1A8BvGsr9tkh+F 5TTkFVYR6GNOpn6jx9R/oT5BtAxKl9DRG3Akj4WFpc2zDrhE/x9J4DFntXjjcSNJCZWn Zz1Q== 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=vTGjvjTzDPjY6TxrAmgk3GgvMij5qAcMVOS2jJIWZbw=; b=uLdu+GqAgoXFkg0Qm1U/UbxcPnflHjLR2g5j5ACKT8m4zS5rr7a+j+67S3CJVfRt81 cR4Z55O8hw1sYnjL6935oLmd60mbx13iGprbYcVCeQ9rAyNkAAMNUgqCN55Z6QbQoRky GONCc1A3AI+uSjdcgvzCseme8xkmRGZ43JxIKkiqsEYEHlod6tJmPU//iAiNoOFy2xcL Mqk/ubX4U9IeJOhEpLKCiSfltHPqC/hQGVVLx5E11WkjkFWg+gVRbCVzAN3IK4iPsYTE eG8zv+d/YFWxQRz/xmOqoqcTewAgrLGJ3eerueVkoW+Q7MJKp7lbu5+QomqEBuDxDR5c 72pQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g69si3045933pfg.382.2018.01.24.06.54.44; Wed, 24 Jan 2018 06:54:58 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934035AbeAXOyU (ORCPT + 99 others); Wed, 24 Jan 2018 09:54:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43868 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933763AbeAXOyS (ORCPT ); Wed, 24 Jan 2018 09:54:18 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8A8A4C070E2F; Wed, 24 Jan 2018 14:54:18 +0000 (UTC) Received: from localhost.localdomain (unknown [10.32.181.99]) by smtp.corp.redhat.com (Postfix) with ESMTP id 548D560C9D; Wed, 24 Jan 2018 14:54:06 +0000 (UTC) Message-ID: <1516805645.2476.23.camel@redhat.com> Subject: Re: [RFC PATCH 0/4] softirq: Per vector threading v3 From: Paolo Abeni To: Linus Torvalds 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 , Niklas Cassel Date: Wed, 24 Jan 2018 15:54:05 +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="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 24 Jan 2018 14:54:18 +0000 (UTC) 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.. Niklas suggested a possible relation with CONFIG_IRQ_TIME_ACCOUNTING=y and indeed he was right. The patched kernel under test had CONFIG_IRQ_TIME_ACCOUNTING set, and very little CPU time was accounted to the kworker: [2125 is the relevant kworker's pid] grep sum_exec_runtime /proc/2125/sched; sleep 10; grep sum_exec_runtime /proc/2125/sched se.sum_exec_runtime : 13408.239286 se.sum_exec_runtime : 13456.907197 despite such process was processing a lot of packets and basically burning a CPU. Switching CONFIG_IRQ_TIME_ACCOUNTING off I see the expected behaviour: top reports that the user space process and kworker share the CPU almost fairly and the user space process is able to receive a reasonable amount of packets. Paolo